Skip to content

Fix solve_troposphere bug#255

Open
betsy-loaiza wants to merge 1 commit into
demiangomez:masterfrom
betsy-loaiza:fix-solve-troposphere-list
Open

Fix solve_troposphere bug#255
betsy-loaiza wants to merge 1 commit into
demiangomez:masterfrom
betsy-loaiza:fix-solve-troposphere-list

Conversation

@betsy-loaiza

Copy link
Copy Markdown

The --solve_troposphere argument is defined with nargs=1, so when it is provided on the command line, argparse returns a list instead of an integer. However, the code later expects an integer value.

This causes an issue when the --solve_troposphere option is provided on the command line. The default value is not affected because it is stored as an integer.

This change adds a check to handle the case where solve_troposphere is a list by using its first element.

@demiangomez demiangomez left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Actually, we should not test for list and drop the nargs=1 in the parser.add_argument. That way the parameter will always be an int. Then also remove the solve_troposphere = solve_troposphere[0].

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