Message141881
Okay, the problem occurs because builtin functions and Python functions are handled differently. This is how you need to set a Python importer:
vinay@eta-natty:~$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging.config
>>> BC = logging.config.BaseConfigurator
>>> from importlib import import_module
>>> class CC(BC):
... importer = staticmethod(import_module)
...
>>> CC.importer
<function import_module at 0xb746db54>
>>> CC.importer('pickle')
<module 'pickle' from '/usr/lib/python2.7/pickle.pyc'>
>>> CC({}).importer('pickle')
<module 'pickle' from '/usr/lib/python2.7/pickle.pyc'>
I will update the documentation to indicate this, but I don't think a change to logging.config is needed. |
|
Date |
User |
Action |
Args |
2011-08-10 19:19:39 | vinay.sajip | set | recipients:
+ vinay.sajip, r.david.murray, Alexandr |
2011-08-10 19:19:38 | vinay.sajip | set | messageid: <1313003978.92.0.73449694031.issue12718@psf.upfronthosting.co.za> |
2011-08-10 19:19:38 | vinay.sajip | link | issue12718 messages |
2011-08-10 19:19:38 | vinay.sajip | create | |
|