Repository :
http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
---------------------------------------------------------------
commit 51d9853c6112d2a2aebc7b5bebfdc0d85989acf4
Author: Peter Hatina <phatina(a)redhat.com>
Date: Tue Jan 15 14:48:49 2013 +0100
pass script exit code to the shell
---------------------------------------------------------------
cli-tools/lmishell | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/cli-tools/lmishell b/cli-tools/lmishell
index 927d65d..fb7aa0e 100755
--- a/cli-tools/lmishell
+++ b/cli-tools/lmishell
@@ -260,5 +260,8 @@ if __name__ == "__main__":
"connect" : _connect_noninteractive
}
sys.argv = options.script_args
- execfile(options.script_name, locals)
+ try:
+ execfile(options.script_name, locals)
+ except SystemExit, e:
+ sys.exit(e.code)
sys.exit(0)