mkksiso: Return 1 on errors

Related: rhbz#2028104
This commit is contained in:
Brian C. Lane 2021-12-06 14:56:50 -08:00
parent 2a77f49be9
commit 0ca53768e0

View File

@ -605,7 +605,7 @@ def main():
if os.getuid() != 0: if os.getuid() != 0:
log.error("You must run this as root, it needs to mount the iso and run mkefiboot") log.error("You must run this as root, it needs to mount the iso and run mkefiboot")
sys.exit(-1) return 1
try: try:
app = MakeKickstartISO(args.ks, args.input_iso, args.output_iso, app = MakeKickstartISO(args.ks, args.input_iso, args.output_iso,
@ -613,6 +613,10 @@ def main():
app.run() app.run()
except RuntimeError as e: except RuntimeError as e:
log.error(str(e)) log.error(str(e))
return 1
return 0
if __name__ == '__main__': if __name__ == '__main__':
main() sys.exit(main())