Skip to content

Commit ef3336d

Browse files
authored
Merge pull request #62 from FoamyGuy/remove_extra_newline
remove extra newlines
2 parents cbfea81 + 48fd441 commit ef3336d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_logging.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def format(self, record: LogRecord) -> str:
209209
"""
210210
text = super().format(record)
211211
lines = text.splitlines()
212-
return self.terminator.join(lines) + self.terminator
212+
return self.terminator.join(lines)
213213

214214
def emit(self, record: LogRecord) -> None:
215215
"""Send a message to the console.
@@ -561,7 +561,7 @@ def exception(self, err: Exception) -> None:
561561
)
562562
else:
563563
lines = [str(err)] + traceback.format_exception(err)
564-
lines = str(err) + "\n".join(lines)
564+
lines = str(err) + "".join(lines)
565565
# some of the returned strings from format_exception already have newlines in them,
566566
# so we can't add the indent in the above line - needs to be done separately
567567
lines = lines.replace("\n", "\n ")

0 commit comments

Comments
 (0)