mirror of https://github.com/python/cpython.git
From SF patch 638299 [by Vinaj]: fileConfig() now takes an optional
defaults dictionary parameter which is passed to ConfigParser.
This commit is contained in:
parent
de1d51fc12
commit
3165786dd1
|
@ -40,7 +40,7 @@
|
|||
# _listener holds the server object doing the listening
|
||||
_listener = None
|
||||
|
||||
def fileConfig(fname):
|
||||
def fileConfig(fname, defaults=None):
|
||||
"""
|
||||
Read the logging configuration from a ConfigParser-format file.
|
||||
|
||||
|
@ -55,7 +55,7 @@ def fileConfig(fname):
|
|||
"""
|
||||
import ConfigParser
|
||||
|
||||
cp = ConfigParser.ConfigParser()
|
||||
cp = ConfigParser.ConfigParser(defaults)
|
||||
if hasattr(cp, 'readfp') and hasattr(fname, 'readline'):
|
||||
cp.readfp(fname)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue