summaryrefslogtreecommitdiff
path: root/Lib/logging/config.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2011-10-28 14:45:05 +0200
committerFlorent Xicluna <florent.xicluna@gmail.com>2011-10-28 14:45:05 +0200
commit5d1155c08edf7f53eca804b2b6538636c2dfe711 (patch)
treedcb2cf857c20dce837c82de7aea432ccf9a41355 /Lib/logging/config.py
parentf99e4b5dbef57e13dd603dcc0edd9b7318f08c28 (diff)
downloadcpython-git-5d1155c08edf7f53eca804b2b6538636c2dfe711.tar.gz
Closes #13258: Use callable() built-in in the standard library.
Diffstat (limited to 'Lib/logging/config.py')
-rw-r--r--Lib/logging/config.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index c7359cabe9..373da2b076 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -471,7 +471,7 @@ class BaseConfigurator(object):
def configure_custom(self, config):
"""Configure an object with a user-supplied factory."""
c = config.pop('()')
- if not hasattr(c, '__call__'):
+ if not callable(c):
c = self.resolve(c)
props = config.pop('.', None)
# Check for valid identifiers
@@ -690,7 +690,7 @@ class DictConfigurator(BaseConfigurator):
filters = config.pop('filters', None)
if '()' in config:
c = config.pop('()')
- if not hasattr(c, '__call__') and hasattr(types, 'ClassType') and type(c) != types.ClassType:
+ if not callable(c):
c = self.resolve(c)
factory = c
else: