Skip to content

Commit

Permalink
Merge pull request #1390 from ESMCI/jgfouca/fix_bug_in_errput_run_cmd
Browse files Browse the repository at this point in the history
Errput may be empty string or None
  • Loading branch information
jedwards4b authored Apr 20, 2017
2 parents 6dd85dd + 11527f9 commit 2742c17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/lib/CIME/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def run_cmd_no_fail(cmd, input_str=None, from_dir=None, verbose=None,
if stat != 0:
# If command produced no errput, put output in the exception since we
# have nothing else to go on.
errput = output if errput == "" else errput
errput = output if not errput else errput
expect(False, "Command: '%s' failed with error '%s'%s" %
(cmd, errput, "" if from_dir is None else " from dir '%s'" % from_dir))

Expand Down

0 comments on commit 2742c17

Please sign in to comment.