Skip to content

Fix _read_mom input err msg - #350

Open
alperaltuntas wants to merge 1 commit into
mainfrom
fix_read_MOM_input_err_msg
Open

alperaltuntas wants to merge 1 commit into
mainfrom
fix_read_MOM_input_err_msg

Conversation

@alperaltuntas

Copy link
Copy Markdown
Member

_read_MOM_input prints out an error message if a variable is specified more than once. The error message includes the input_path which was previously a string, but now is a Path object. So, we need to cast it string.

_read_MOM_input prints out an error message if a variable is specified more than once.
The error message includes the input_path which was previously a string, but now is a Path
object. So, we need to cast it.

@mnlevy1981 mnlevy1981 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@mnlevy1981 mnlevy1981 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there a reason to use the + operator instead of just an f-string, though?

raise SystemExit(f"ERROR: {varname} listed more than once in {input_path}")

should work with both strings and Path objects

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.

2 participants