[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] dak: don't ignore SystemExit



Let the python interpreter handle it and actually exit with the right
status, otherwise when a sub-command calls sys.exit(1) we end up exiting
0 instead, which is confusing if not dangerous.

Signed-off-by: Julien Cristau <jcristau@debian.org>
---
This is also available as the 'stop-swallowing-errors' branch of
https://anonscm.debian.org/git/users/jcristau/dak.git

 dak/dak.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dak/dak.py b/dak/dak.py
index c3c7f0d..191664f 100755
--- a/dak/dak.py
+++ b/dak/dak.py
@@ -228,7 +228,7 @@ def main():
             logger.log([msg])
         sys.exit(1)
     except SystemExit:
-        pass
+        raise
     except:
         if logger:
             for line in traceback.format_exc().split('\n')[:-1]:
-- 
2.8.1


Reply to: