summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2012-01-24 11:43:46 +1100
committerAmitay Isaacs <amitay@gmail.com>2012-01-24 11:55:49 +1100
commitbe292021f47eeaa1364bedb2dc9232b60c404fce (patch)
treef57c6fdd734878580dc563b0627cbc794230da9d /script
parent869fd8eeba00bd62e89de344184ef748c5c0f9c0 (diff)
downloadsamba-be292021f47eeaa1364bedb2dc9232b60c404fce.tar.gz
samba-be292021f47eeaa1364bedb2dc9232b60c404fce.tar.bz2
samba-be292021f47eeaa1364bedb2dc9232b60c404fce.zip
autobuild.py: Catch only true exceptions in except statement
sys.exit(0) raises systemExit which is caught in empty except: statement. This can change the exit status if except: condition is supposed to exit with different status value.
Diffstat (limited to 'script')
-rwxr-xr-xscript/autobuild.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/script/autobuild.py b/script/autobuild.py
index d6ad082510..8ddd4b3e66 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -493,7 +493,7 @@ while True:
run_cmd("rm -rf %s" % test_master)
cleanup_list.append(test_master)
run_cmd("git clone --shared %s %s" % (gitroot, test_master), show=True, dir=gitroot)
- except:
+ except Exception:
cleanup()
raise
@@ -503,7 +503,7 @@ while True:
rebase_tree(options.rebase)
elif options.rebase_master:
rebase_tree(samba_master)
- except:
+ except Exception:
cleanup_list.append(gitroot + "/autobuild.pid")
cleanup()
email_failure(-1, 'rebase', 'rebase', 'rebase', 'rebase on master failed')
@@ -515,7 +515,7 @@ while True:
if status != 0 or errstr != "retry":
break
cleanup()
- except:
+ except Exception:
cleanup()
raise