Code

Ticket #17447: django.utils.dictconfig.diff

File django.utils.dictconfig.diff, 1005 bytes (added by zimmermann, 2 years ago)
Line 
1diff -r 0c76b026c926 django/utils/dictconfig.py
2--- a/django/utils/dictconfig.py        Thu Dec 22 08:33:58 2011 +0000
3+++ b/django/utils/dictconfig.py        Thu Dec 22 17:16:52 2011 +0100
4@@ -246,7 +246,7 @@
5     def configure_custom(self, config):
6         """Configure an object with a user-supplied factory."""
7         c = config.pop('()')
8-        if not hasattr(c, '__call__') and hasattr(types, 'ClassType') and type(c) != types.ClassType:
9+        if not hasattr(c, '__call__') and type(c) != types.ClassType:
10             c = self.resolve(c)
11         props = config.pop('.', None)
12         # Check for valid identifiers
13@@ -467,7 +467,7 @@
14         filters = config.pop('filters', None)
15         if '()' in config:
16             c = config.pop('()')
17-            if not hasattr(c, '__call__') and hasattr(types, 'ClassType') and type(c) != types.ClassType:
18+            if not hasattr(c, '__call__') and type(c) != types.ClassType:
19                 c = self.resolve(c)
20             factory = c
21         else: