Skip to content

Commit a91f8e6

Browse files
committed
check_output can raise a OSError if nvidia-smi does not exist
1 parent ba76295 commit a91f8e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xpra/codecs/nvidia/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def _has_nvidia_hardware() -> bool | None:
8888
if output:
8989
log(f"has_nvidia_hardware() found NVIDIA GPU(s) using nvidia-smi: {output}")
9090
return True
91-
except (FileNotFoundError, subprocess.CalledProcessError):
91+
except (FileNotFoundError, subprocess.CalledProcessError, OSError):
9292
log("has_nvidia_hardware() nvidia-smi command not found or failed")
9393
# hope for the best
9494
log("has_nvidia_hardware() unable to ascertain, returning None")

0 commit comments

Comments
 (0)