Changeset 7673 for TI12-security


Ignore:
Timestamp:
01/11/10 11:05:50 (9 years ago)
Author:
pjkersha
Message:

Fix mutable keyword defaults

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/ndg_saml/ndg/saml/xml/etree.py

    r7259 r7673  
    941941    xsstringMatch = staticmethod(toSAMLTypeMap[0]) 
    942942    
    943     def __init__(self, customToXMLTypeMap={}, customToSAMLTypeMap=[]):  
     943    def __init__(self, customToXMLTypeMap=None, customToSAMLTypeMap=None):  
    944944        """Set-up a SAML class to ElementTree mapping 
    945945         
     
    954954        to the respective self.__toSAMLTypeMap 
    955955        """ 
     956        if customToXMLTypeMap is None: 
     957            customToXMLTypeMap = {} 
     958             
     959        if customToSAMLTypeMap is None: 
     960            customToSAMLTypeMap = [] 
     961             
    956962        self.__toXMLTypeMap = AttributeValueElementTreeFactory.toXMLTypeMap 
    957963        if not isinstance(customToXMLTypeMap, dict): 
Note: See TracChangeset for help on using the changeset viewer.