Skip to content

Fix decoding errors in scripts/common.py's execute_cmd#295

Merged
climbfuji merged 2 commits into
NCAR:masterfrom
climbfuji:fix_decoding_errors_stampede
Jun 1, 2020
Merged

Fix decoding errors in scripts/common.py's execute_cmd#295
climbfuji merged 2 commits into
NCAR:masterfrom
climbfuji:fix_decoding_errors_stampede

Conversation

@climbfuji
Copy link
Copy Markdown
Collaborator

@climbfuji climbfuji commented May 14, 2020

This PR:

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

Associated PRs:
#295
NOAA-EMC/ufsatm#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
Copy Markdown
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
Copy Markdown
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 thread scripts/common.py Outdated
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
Copy Markdown
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
Copy Markdown
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