From 707554324af40db53e2f342bce3e454d33779af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Date: Mon, 6 Mar 2023 19:12:18 +0000 Subject: [PATCH] TOOLS/docutils-wrapper: handle commands without depfile --- TOOLS/docutils-wrapper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/TOOLS/docutils-wrapper.py b/TOOLS/docutils-wrapper.py index 4e31c37417..31ba976e64 100755 --- a/TOOLS/docutils-wrapper.py +++ b/TOOLS/docutils-wrapper.py @@ -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)