From f452ca226e23e8ecfb7f9b329948a810b5407875 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 23 Nov 2015 23:48:58 +0100 Subject: [PATCH] frontend: return instead of exit --- stcgal.py | 3 ++- stcgal/frontend.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/stcgal.py b/stcgal.py index 89c767d..8777678 100755 --- a/stcgal.py +++ b/stcgal.py @@ -21,7 +21,8 @@ # SOFTWARE. # +import sys import stcgal.frontend if __name__ == "__main__": - stcgal.frontend.cli() + sys.exit(stcgal.frontend.cli()) diff --git a/stcgal/frontend.py b/stcgal/frontend.py index c41ff08..3979102 100644 --- a/stcgal/frontend.py +++ b/stcgal/frontend.py @@ -152,4 +152,4 @@ def cli(): # run programmer gal = StcGal(opts) - sys.exit(gal.run()) + return gal.run()