Fix attributes with None in convert_xsdir.py.

This commit is contained in:
Paul Romano 2011-11-02 18:38:15 -04:00
parent 29d3111e0f
commit 5994ee0424

View file

@ -154,7 +154,10 @@ class XsdirTable(object):
@property
def zaid(self):
return self.name[:self.name.find('.')]
if self.name.endswith('c'):
return self.name[:self.name.find('.')]
else:
return 0
def to_xml_node(self, doc):
node = doc.createElement("ace_table")
@ -176,6 +179,10 @@ class XsdirTable(object):
if attribute == "binary" and self.binary == 0:
continue
# Skip any attribute that is none
if getattr(self, attribute) is None:
continue
# Create attribute node
# nodeAttr = doc.createElement(attribute)
# text = doc.createTextNode(string)