summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorJoe Guo <joeg@catalyst.net.nz>2019-05-23 14:07:49 +1200
committerAndrew Bartlett <abartlet@samba.org>2019-06-20 23:40:17 +0000
commitfb12a252613205dd0ebcfc8716847aed510e07cb (patch)
tree2e4744ba73341ef620d21b62e1fc135f9f6e41e4 /script
parentae90e5263bd65042b067ab900c83bf310f977dbd (diff)
downloadsamba-fb12a252613205dd0ebcfc8716847aed510e07cb.tar.gz
script/autobuild.py: avoid nested try except block
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'script')
-rwxr-xr-xscript/autobuild.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/script/autobuild.py b/script/autobuild.py
index 0a4d7ada21d..0d5f304f3f7 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -1173,17 +1173,18 @@ while True:
raise
try:
- try:
- if options.rebase is not None:
- rebase_tree(options.rebase, rebase_branch=options.branch)
- except Exception:
- cleanup_list.append(gitroot + "/autobuild.pid")
- cleanup()
- elapsed_time = time.time() - start_time
- email_failure(-1, 'rebase', 'rebase', 'rebase',
- 'rebase on %s failed' % options.branch,
- elapsed_time, log_base=options.log_base)
- sys.exit(1)
+ if options.rebase is not None:
+ rebase_tree(options.rebase, rebase_branch=options.branch)
+ except Exception:
+ cleanup_list.append(gitroot + "/autobuild.pid")
+ cleanup()
+ elapsed_time = time.time() - start_time
+ email_failure(-1, 'rebase', 'rebase', 'rebase',
+ 'rebase on %s failed' % options.branch,
+ elapsed_time, log_base=options.log_base)
+ sys.exit(1)
+
+ try:
blist = buildlist(args, options.rebase, rebase_branch=options.branch)
if options.tail:
blist.start_tail()