mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fix attributes with None in convert_xsdir.py.
This commit is contained in:
parent
29d3111e0f
commit
5994ee0424
1 changed files with 8 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue