Changeset 7695 for TI12-security


Ignore:
Timestamp:
03/11/10 08:56:52 (9 years ago)
Author:
pjkersha
Message:
  • fix to ndg.saml.utils.factory.importModuleObject to set objectName to list type.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/ndg_saml/ndg/saml/utils/factory.py

    r7694 r7695  
    3939                raise ValueError('Invalid module name %r set for import: %s' % 
    4040                                 (moduleName, traceback.format_exc())) 
    41                  
    42             objectName = [objectName] 
    4341    else: 
    4442        _moduleName = moduleName 
    45         if isinstance(objectName, basestring): 
    46             objectName = [objectName] 
     43         
     44    if isinstance(objectName, basestring): 
     45        objectName = [objectName] 
    4746     
    4847    log.debug("Importing %r ..." % objectName)  
     
    5352        for component in components[1:]: 
    5453            module = getattr(module, component) 
    55     except AttributeError, e: 
     54    except AttributeError: 
    5655        raise AttributeError("Error importing %r: %s" % 
    5756                             (objectName, traceback.format_exc())) 
Note: See TracChangeset for help on using the changeset viewer.