mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-115032: Update DictConfigurator.configure_formatter() comment about fmt retry. (GH-115303)
This commit is contained in:
parent
0a6e1a4119
commit
d823c23549
1 changed files with 3 additions and 4 deletions
|
|
@ -667,10 +667,9 @@ def configure_formatter(self, config):
|
|||
except TypeError as te:
|
||||
if "'format'" not in str(te):
|
||||
raise
|
||||
#Name of parameter changed from fmt to format.
|
||||
#Retry with old name.
|
||||
#This is so that code can be used with older Python versions
|
||||
#(e.g. by Django)
|
||||
# logging.Formatter and its subclasses expect the `fmt`
|
||||
# parameter instead of `format`. Retry passing configuration
|
||||
# with `fmt`.
|
||||
config['fmt'] = config.pop('format')
|
||||
config['()'] = factory
|
||||
result = self.configure_custom(config)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue