summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-11-23 13:01:00 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-11-24 16:47:20 +0100
commitceca7c500563c59b70f43887e4593203a5de2052 (patch)
tree5452855d7679fe81825573a9dd09a4db17870626 /test
parenttest: Format integration-test-wrapper.py (diff)
downloadsystemd-ceca7c500563c59b70f43887e4593203a5de2052.tar.xz
systemd-ceca7c500563c59b70f43887e4593203a5de2052.zip
test: Fix typing errors in integration-test-wrapper.py
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration-test-wrapper.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/integration-test-wrapper.py b/test/integration-test-wrapper.py
index 30b9d8b172..737bbd4272 100755
--- a/test/integration-test-wrapper.py
+++ b/test/integration-test-wrapper.py
@@ -32,7 +32,7 @@ ExecStart=false
"""
-def main():
+def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--mkosi', required=True)
parser.add_argument('--meson-source-dir', required=True, type=Path)
@@ -184,7 +184,8 @@ def main():
# On Debian/Ubuntu we get a lot of random QEMU crashes. Retry once, and then skip if it fails again.
if args.vm and result.returncode == 247 and args.exit_code != 247:
- journal_file.unlink(missing_ok=True)
+ if journal_file:
+ journal_file.unlink(missing_ok=True)
result = subprocess.run(cmd)
if args.vm and result.returncode == 247 and args.exit_code != 247:
print(