Fixed tabs to please tab nanny.

This commit is contained in:
Lance Stout 2010-07-11 21:43:51 -04:00
parent 7f8179d91e
commit d0cb400c54

View file

@ -41,7 +41,7 @@ class Addresses(ElementBase):
def setAddresses(self, addresses, set_type=None): def setAddresses(self, addresses, set_type=None):
self.delAddresses(set_type) self.delAddresses(set_type)
for addr in addresses: for addr in addresses:
addr = dict(addr) addr = dict(addr)
# Remap 'type' to 'atype' to match the add method # Remap 'type' to 'atype' to match the add method
if set_type is not None: if set_type is not None:
addr['type'] = set_type addr['type'] = set_type
@ -52,8 +52,8 @@ class Addresses(ElementBase):
self.addAddress(**addr) self.addAddress(**addr)
def delAddresses(self, atype=None): def delAddresses(self, atype=None):
if atype is None: if atype is None:
return return
for addrXML in self.xml.findall('{%s}address' % Address.namespace): for addrXML in self.xml.findall('{%s}address' % Address.namespace):
# ElementTree 1.2.6 does not support [@attr='value'] in findall # ElementTree 1.2.6 does not support [@attr='value'] in findall
if addrXML.attrib.get('type') == atype: if addrXML.attrib.get('type') == atype: