]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
scripts: do not use uninitialized variable
authorJán Tomko <jtomko@redhat.com>
Fri, 7 Nov 2025 14:44:09 +0000 (15:44 +0100)
committerJán Tomko <jtomko@redhat.com>
Fri, 7 Nov 2025 14:44:09 +0000 (15:44 +0100)
A previous commit removed the 'ret' variable when
switching to subprocess.run, but did not adjust
the exit code.

Fixes: 15c9ca383c2a814c61cc4ed16b4dad91221d8129
Signed-off-by: Ján Tomko <jtomko@redhat.com>
scripts/check-file-access.py

index 71130d4dec23fbeb9054e4ac3188ea7695ea92a2..42c9c6b98932650bffd2c2bf9f5e4019b6f9c419 100755 (executable)
@@ -42,7 +42,7 @@ proc = subprocess.run(sys.argv[1:])
 if proc.returncode != 0 or os.read(access_fd, 10) == b'':
     os.close(access_fd)
     os.remove(access_file)
-    sys.exit(ret)
+    sys.exit(proc.returncode)
 
 known_actions = ["open", "fopen", "access", "stat", "lstat", "connect"]