diff --git a/src/utils/convert_xsdir.py b/src/utils/convert_xsdir.py index f0e8d04a22..7ff1ea892a 100755 --- a/src/utils/convert_xsdir.py +++ b/src/utils/convert_xsdir.py @@ -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)