1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00

TOOLS/docutils-wrapper: handle commands without depfile

This commit is contained in:
Thomas Weißschuh 2023-03-06 19:12:18 +00:00 committed by Dudemanguy
parent 375e527620
commit 707554324a

View File

@ -56,10 +56,12 @@ for opt, optarg in zip(argv, argv[1:]):
try:
proc = subprocess.run(argv, check=True)
convert_depfile(output, depfile)
if depfile is not None:
convert_depfile(output, depfile)
except:
remove(output)
remove(depfile)
if depfile is not None:
remove(depfile)
sys.exit(1)
sys.exit(proc.returncode)