From 4a5e0144d732ec93bcdf0f795f0a01482053f227 Mon Sep 17 00:00:00 2001 From: Akira Ohgaki <akiraohgaki@gmail.com> Date: Fri, 15 Jul 2016 09:51:17 +0900 Subject: [PATCH] Exit code --- src/xdgurl.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xdgurl.py b/src/xdgurl.py index 00ff787..c397706 100644 --- a/src/xdgurl.py +++ b/src/xdgurl.py @@ -404,6 +404,8 @@ def main(): tkinter.messagebox.showerror(program, info_text + '\n\n' + message + '\n' + str(e)) else: tkMessageBox.showerror(program, info_text + '\n\n' + message + '\n' + str(e)) + + return str(e) # stderr and exit code 1 else: message = 'Download successfull' if core.meta['command'] == 'install': @@ -414,7 +416,7 @@ def main(): tkinter.messagebox.showinfo(program, message) else: tkMessageBox.showinfo(program, message) - sys.exit() + return 0 if __name__ == '__main__': - main() + sys.exit(main()) -- GitLab