Skip to content

Commit 759a2a0

Browse files
authored
Merge pull request #1 from gonuke/memo_mcnp
Suggested enhancement
2 parents f4e0f20 + 2f3b4c8 commit 759a2a0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

pyne/mcnp.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,9 +1406,10 @@ def mat_from_inp_line(filename, mat_line, densities='None'):
14061406
# For deafult cross-section library. Requires a seperate line(s) of library indicator
14071407
# in material card
14081408
lib_name = ['nlib', 'plib', 'hlib', 'pnlib', 'elib']
1409-
if line.split()[0][0:4] in lib_name:
1410-
for item in line.split():
1411-
lib_id[item.split('=')[0]] = item.split('=')[1]
1409+
for token in line.split():
1410+
if '=' in token:
1411+
if token.split('=')[0] in lib_name:
1412+
lib_id[token.split('=')[0]] = item.split('=')[1]
14121413

14131414
# make sure element/isotope is not commented out
14141415
if line.split()[0][0] != 'c' and line.split()[0][0] != 'C' \

0 commit comments

Comments
 (0)