mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Last @paulromano comment I held off on. Didnt update all mgxs h5 libraries yet as future comments from others will require I do that anyways.
This commit is contained in:
parent
a00a880b88
commit
c446f10e5a
4 changed files with 9 additions and 11 deletions
|
|
@ -63,17 +63,15 @@ def parse_args():
|
|||
|
||||
|
||||
def get_data(element, entry):
|
||||
try:
|
||||
value = element.find(entry).text
|
||||
except:
|
||||
value = element.find(entry)
|
||||
if value is not None:
|
||||
value = value.text.strip()
|
||||
else:
|
||||
if entry in element.attrib:
|
||||
value = element.attrib[entry]
|
||||
value = element.attrib[entry].strip()
|
||||
else:
|
||||
value = None
|
||||
|
||||
if value is not None:
|
||||
value = value.strip()
|
||||
|
||||
return value
|
||||
|
||||
|
||||
|
|
@ -140,7 +138,7 @@ if __name__ == '__main__':
|
|||
try:
|
||||
# It is in our list, so store that entry
|
||||
i = names.index(name)
|
||||
except:
|
||||
except ValueError:
|
||||
# It is not in our list, so add it
|
||||
i = -1
|
||||
xsd.append(openmc.XSdata(name, energy_groups,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue