Skip to content

Commit

Permalink
bugfix: do not substitute the error if it was already an error
Browse files Browse the repository at this point in the history
  • Loading branch information
ens-lg4 committed Dec 4, 2018
1 parent a4f64b3 commit bde4bfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/program/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -3466,7 +3466,7 @@ def run(i):
i['sub_action']='run'
run_output_dict = process(i)

if i.get('treat_return_code_as_exit_code', '')=='yes':
if i.get('treat_return_code_as_exit_code', '')=='yes' and run_output_dict.get('return')==0:
run_output_dict['return'] = run_output_dict['characteristics']['return_code']
run_output_dict['error'] = run_output_dict['characteristics'].get('fail_reason')

Expand Down

0 comments on commit bde4bfb

Please sign in to comment.