From ae2261b4c724200df0b0cbb282637601a3520693 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Sep 15 2020 14:11:11 +0000 Subject: PR#2486: cli: propagate system exit codes Merges #2486 https://pagure.io/koji/pull-request/2486 Fixes: #2273 https://pagure.io/koji/issue/2273 kojira with no such options returns code 2, koji CLI returns 1 --- diff --git a/cli/koji b/cli/koji index 3e9c563..284230a 100755 --- a/cli/koji +++ b/cli/koji @@ -337,8 +337,10 @@ if __name__ == "__main__": rv = locals()[command].__call__(options, session, args) if not rv: rv = 0 - except (KeyboardInterrupt, SystemExit): + except KeyboardInterrupt: rv = 1 + except SystemExit: + raise except Exception: if options.debug: raise