From f0a7c0101b8e99ae778097f28eb3d20f0e716bfa Mon Sep 17 00:00:00 2001 From: J-Donald Tournier Date: Tue, 3 Feb 2015 10:52:15 +0000 Subject: [PATCH] configure: fix minor bug in exception handling --- configure | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 4f720e06a5..c6cecd5b5c 100755 --- a/configure +++ b/configure @@ -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)