Skip to content

Commit d823c23

Browse files
authored
gh-115032: Update DictConfigurator.configure_formatter() comment about fmt retry. (GH-115303)
1 parent 0a6e1a4 commit d823c23

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Lib/logging/config.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,10 +667,9 @@ def configure_formatter(self, config):
667667
except TypeError as te:
668668
if "'format'" not in str(te):
669669
raise
670-
#Name of parameter changed from fmt to format.
671-
#Retry with old name.
672-
#This is so that code can be used with older Python versions
673-
#(e.g. by Django)
670+
# logging.Formatter and its subclasses expect the `fmt`
671+
# parameter instead of `format`. Retry passing configuration
672+
# with `fmt`.
674673
config['fmt'] = config.pop('format')
675674
config['()'] = factory
676675
result = self.configure_custom(config)

0 commit comments

Comments
 (0)