Message172015
I could consider relaxing the parameters on fileConfig such that instead of accepting just a string or a file-like object, it additionally accepts a ConfigParser instance. More specifically:
def fileConfig(file_or_fname_or_cp, defaults=None):
if isinstance(file_or_fname_or_cp, RawConfigParser):
cp = file_or_filename_or_cp
else:
cp = ConfigParser.ConfigParser(defaults)
if hasattr(cp, 'readfp') and\
hasattr(file_or_fname_or_cp, 'readline'):
cp.readfp(file_or_fname_or_cp)
else:
cp.read(file_or_fname_or_cp)
formatters = _create_formatters(cp)
This will only require (in addition to the above) small tweaks to docs
and tests. It would appear to fit the bill for your use case. Do you agree? |
|
Date |
User |
Action |
Args |
2012-10-04 22:50:42 | vinay.sajip | set | recipients:
+ vinay.sajip, r.david.murray, thbach |
2012-10-04 22:50:42 | vinay.sajip | set | messageid: <1349391042.73.0.224003498489.issue16110@psf.upfronthosting.co.za> |
2012-10-04 22:50:42 | vinay.sajip | link | issue16110 messages |
2012-10-04 22:50:42 | vinay.sajip | create | |
|