cli: propagate system exit codes

Fixes: https://pagure.io/koji/issue/2273
This commit is contained in:
Tomas Kopecek 2020-09-10 13:44:04 +02:00
parent 4ae23c1847
commit c0ffe4ed27

View file

@ -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