Skip to content

Commit f8372d5

Browse files
author
RamanjaneyuluIdavalapati
committed
Adding back catching SystemExit
1 parent 0254b0e commit f8372d5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

basescript/basescript.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ def start(self):
7272
# invoke the appropriate sub-command as requested from command-line
7373
try:
7474
self.args.func()
75-
self.log.debug("exited_successfully")
75+
except SystemExit as e:
76+
if e.code != 0:
77+
raise
7678
except KeyboardInterrupt:
7779
self.log.warning("exited via keyboard interrupt")
7880
except Exception as e:
@@ -82,6 +84,8 @@ def start(self):
8284
self._flush_metrics_q.put(None, block=True)
8385
self._flush_metrics_q.put(None, block=True, timeout=1)
8486

87+
self.log.debug("exited_successfully")
88+
8589
@property
8690
def name(self):
8791
return ".".join([x for x in (sys.argv[0].split(".")[0], self.args.name) if x])

0 commit comments

Comments
 (0)