From 48fd4412ed46114e61fb1c9ab7c7aba918d236df Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 5 Aug 2024 19:04:29 -0500 Subject: [PATCH] remove extra newlines --- adafruit_logging.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adafruit_logging.py b/adafruit_logging.py index 6394f16..117c1bf 100644 --- a/adafruit_logging.py +++ b/adafruit_logging.py @@ -209,7 +209,7 @@ def format(self, record: LogRecord) -> str: """ text = super().format(record) lines = text.splitlines() - return self.terminator.join(lines) + self.terminator + return self.terminator.join(lines) def emit(self, record: LogRecord) -> None: """Send a message to the console. @@ -561,7 +561,7 @@ def exception(self, err: Exception) -> None: ) else: lines = [str(err)] + traceback.format_exception(err) - lines = str(err) + "\n".join(lines) + lines = str(err) + "".join(lines) # some of the returned strings from format_exception already have newlines in them, # so we can't add the indent in the above line - needs to be done separately lines = lines.replace("\n", "\n ")