1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvmdbustest: Check for needed env. variables

This commit is contained in:
Tony Asleson 2023-03-10 10:41:50 -06:00
parent 568e8c71d7
commit f8876290bf

View File

@ -336,8 +336,12 @@ if __name__ == "__main__":
cmdline.extend(args)
ec = run_one(cmdline)
else:
SH = LvmShellHandler(cmdline)
ec = SH.run()
if "LVM_REPORT_FD" in os.environ:
SH = LvmShellHandler(cmdline)
ec = SH.run()
else:
debug('running as lvm shell requires: LVM_REPORT_FD to be set')
ec = 1
sys.exit(ec)
except Exception:
traceback.print_exc(file=d_out)