Added optional default value to _getAttr.

This commit is contained in:
Lance Stout
2010-07-30 14:11:24 -04:00
parent cbed8029ba
commit 1cedea2804
2 changed files with 5 additions and 2 deletions

View File

@@ -235,8 +235,8 @@ class ElementBase(tostring.ToString):
if name in self.xml.attrib:
del self.xml.attrib[name]
def _getAttr(self, name):
return self.xml.attrib.get(name, '')
def _getAttr(self, name, default=''):
return self.xml.attrib.get(name, default)
def _getSubText(self, name):
if '}' not in name: