Skip to content

Commit c9ae545

Browse files
committed
prevent defaults from clobbering
1 parent ef8c237 commit c9ae545

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

adafruit_logging.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ def format(self, record: LogRecord) -> str:
206206

207207
if self.defaults:
208208
for key, val in self.defaults.items():
209-
vals[key] = val
209+
if key not in vals:
210+
vals[key] = val
210211

211212
if self.style not in ("{", "%"):
212213
raise ValueError(

0 commit comments

Comments
 (0)