Ticket #17447: django.utils.dictconfig.diff

File django.utils.dictconfig.diff, 1005 bytes (added by zimmermann, 4 years ago)
  • django/utils/dictconfig.py

    diff -r 0c76b026c926 django/utils/dictconfig.py
    a b  
    246246    def configure_custom(self, config):
    247247        """Configure an object with a user-supplied factory."""
    248248        c = config.pop('()')
    249         if not hasattr(c, '__call__') and hasattr(types, 'ClassType') and type(c) != types.ClassType:
     249        if not hasattr(c, '__call__') and type(c) != types.ClassType:
    250250            c = self.resolve(c)
    251251        props = config.pop('.', None)
    252252        # Check for valid identifiers
     
    467467        filters = config.pop('filters', None)
    468468        if '()' in config:
    469469            c = config.pop('()')
    470             if not hasattr(c, '__call__') and hasattr(types, 'ClassType') and type(c) != types.ClassType:
     470            if not hasattr(c, '__call__') and type(c) != types.ClassType:
    471471                c = self.resolve(c)
    472472            factory = c
    473473        else:
Back to Top