Use returncode of genisofs as own returncode

This commit is contained in:
Sebastian Lohff 2018-09-16 21:44:45 +02:00
parent 872a95e601
commit 577b857d81
1 changed files with 3 additions and 2 deletions

View File

@ -218,7 +218,7 @@ class ConfigDrive:
self._tmpfs.getsyspath(""), self._tmpfs.getsyspath(""),
]) ])
p.wait() return p.wait()
def close(self): def close(self):
if self._tmpfs: if self._tmpfs:
@ -308,7 +308,8 @@ def main():
cfgdrv.add_user(user[0], keys, sudo=sudo, gecos=gecos, password=password) cfgdrv.add_user(user[0], keys, sudo=sudo, gecos=gecos, password=password)
if args.output: if args.output:
cfgdrv.write_iso(args.output) ret = cfgdrv.write_iso(args.output)
sys.exit(ret)
finally: finally:
if cfgdrv: if cfgdrv:
cfgdrv.close() cfgdrv.close()