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 decoding errors in scripts/common.py's execute_cmd #295

Merged
merged 2 commits into from
Jun 1, 2020

Conversation

climbfuji
Copy link
Collaborator

@climbfuji climbfuji commented May 14, 2020

This PR:

  • scripts/common.py: fix decoding errors detected on Stampede

Associated PRs:
#295
NOAA-EMC/fv3atm#117
NOAA-EMC/NEMS#63
ufs-community/ufs-weather-model#139

For regression testing information, see below ufs-community/ufs-weather-model#139.

@climbfuji
Copy link
Collaborator Author

Note: I flagged this PR and associated PRs as "ready to merge" in case these make it to the top of the commit queue during my two days of holidays. Please do not merge unless agreed upon with @DusanJovic-NOAA and @junwang-noaa.

Copy link
Collaborator

@gold2718 gold2718 left a comment

Choose a reason for hiding this comment

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

Style comment / suggestion.

Comment on lines 62 to 63
message += ' stdout: "{0}"\n'.format(stdout.decode('ascii', 'ignore').rstrip('\n'))
message += ' stderr: "{0}"'.format(stderr.decode('ascii', 'ignore').rstrip('\n'))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Normally, I would use argument names for optional arguments:

stdout.decode(encoding='ascii', errors='ignore')

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added the argument names as requested, thanks for the suggestion.

@climbfuji climbfuji merged commit d31bdb7 into NCAR:master Jun 1, 2020
climbfuji added a commit to climbfuji/ccpp-framework that referenced this pull request Jun 7, 2020
Fix decoding errors in scripts/common.py's execute_cmd
@climbfuji climbfuji deleted the fix_decoding_errors_stampede branch June 27, 2022 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ccpp_prebuild bugs, requests, etc. that involve ccpp_prebuild
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants