Skip to content

Commit 4903449

Browse files
authored
Merge pull request #49 from tyeth/patch-1
Update adafruit_logging.py for no args
2 parents 9785b10 + 64d2a88 commit 4903449

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adafruit_logging.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,9 @@ def hasHandlers(self) -> bool:
324324
return len(self._handlers) > 0
325325

326326
def _log(self, level: int, msg: str, *args) -> None:
327-
record = _logRecordFactory(self.name, level, msg % args, args)
327+
record = _logRecordFactory(
328+
self.name, level, (msg % args) if args else msg, args
329+
)
328330
self.handle(record)
329331

330332
def handle(self, record: LogRecord) -> None:

0 commit comments

Comments
 (0)