Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with empty mds_line #1375

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

makeclean
Copy link
Contributor

Please follow these guidelines when making a Pull Request.
This template was adapted from here and here.

Description

Fixed a bug that occured upon reading a material

Motivation and Context

Fixes a material reading bug

Changes

Bug fix

Behavior

Broken now fixed

Other Information

N/A

@makeclean
Copy link
Contributor Author

Why did CI not launch?

@makeclean
Copy link
Contributor Author

Ah there we go

Copy link
Contributor

@gonuke gonuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great to have a smallest failing example to see what problem this solves? It could be added to tests?

@@ -1507,6 +1507,9 @@ def mat_from_inp_line(filename, mat_line, densities='None'):
# set metadata
line_index += 1
mds_line = linecache.getline(filename, mat_line - line_index)
# its possible this line is blank and will fail on the .split operation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which split fails? A completely blank line is not valid MCNP input. Do you have an example that fails?

@gonuke
Copy link
Contributor

gonuke commented May 26, 2021

Also needs an addition the CHANGELOG.rst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants