Changeset 6720 for TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/attributeauthority.py
- Timestamp:
- 11/03/10 11:30:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/attributeauthority.py
r6719 r6720 123 123 '__propFileSection', 124 124 '__propPrefix', 125 '__attributeInterface', 125 126 '__attributeInterfaceCfg' 126 127 ) … … 140 141 141 142 self.__attributeInterfaceCfg = {} 142 143 144 def __getstate__(self): 145 '''Enable pickling with __slots__''' 146 _dict = {} 147 for attrName in AttributeAuthority.__slots__: 148 # Ugly hack to allow for derived classes setting private member 149 # variables 150 if attrName.startswith('__'): 151 attrName = "_AttributeAuthority" + attrName 152 153 _dict[attrName] = getattr(self, attrName) 154 155 return _dict 156 157 def __setstate__(self, attrDict): 158 '''Enable pickling with __slots__''' 159 for attrName, val in attrDict.items(): 160 setattr(self, attrName, val) 161 162 def _getIssuerName(self): 163 return self.__issuerName 164 165 def _setIssuerName(self, value): 166 if not isinstance(value, basestring): 167 raise TypeError('Expecting string type for "issuerName" attribute; ' 168 'got %r' % type(value)) 169 170 self.__issuerName = value 171 172 issuerName = property(_getIssuerName, _setIssuerName, 173 doc="Name of Attribute Authority organisation " 174 "issuing a response to a query") 175 143 176 def _getAssertionLifetime(self): 144 177 return self.__assertionLifetime 145 146 def _getAttributeInterface(self):147 return self.__attributeInterface148 178 149 179 def _setAssertionLifetime(self, value): … … 156 186 raise TypeError('Expecting float, int, long or string type for ' 157 187 '"assertionLifetime"; got %r' % type(value)) 188 189 def _getAttributeInterface(self): 190 return self.__attributeInterface 158 191 159 192 def _setAttributeInterface(self, value):
Note: See TracChangeset
for help on using the changeset viewer.