From ec0eafacd98b2c7ffecebd10001776c72eac0e4b Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Mon, 6 Dec 2021 14:56:50 -0800 Subject: [PATCH] mkksiso: Return 1 on errors Resolves: rhbz#2028048 --- src/sbin/mkksiso | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sbin/mkksiso b/src/sbin/mkksiso index fcc59c36..9368c8b6 100755 --- a/src/sbin/mkksiso +++ b/src/sbin/mkksiso @@ -605,7 +605,7 @@ def main(): if os.getuid() != 0: log.error("You must run this as root, it needs to mount the iso and run mkefiboot") - sys.exit(-1) + return 1 try: app = MakeKickstartISO(args.ks, args.input_iso, args.output_iso, @@ -613,6 +613,10 @@ def main(): app.run() except RuntimeError as e: log.error(str(e)) + return 1 + + return 0 + if __name__ == '__main__': - main() + sys.exit(main())