Skip to content

Commit

Permalink
configure: fix minor bug in exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jdtournier committed Feb 3, 2015
1 parent 20ba2f8 commit f0a7c01
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,16 @@ def execute (cmd, exception, raise_on_non_zero_exit_code = True, cwd = None):
if len (stderr): log ('STDERR:\n' + stderr + '\n')
log ('>>\n\n')

if raise_on_non_zero_exit_code and process.returncode != 0:
raise exception (stderr)

except OSError as error:
log ('error invoking command "' + cmd[0] + '": ' + error.strerror + '\n>>\n\n')
raise exception
except:
print ('Unexpected error:', str(sys.exc_info()))
raise
else:
if raise_on_non_zero_exit_code and process.returncode != 0:
raise exception (stderr)


return (process.returncode, stdout, stderr)

Expand Down

0 comments on commit f0a7c01

Please sign in to comment.