From 9860f607a0c51d2ea2bb5289e939590f74bf386d Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Wed, 22 Nov 2017 11:47:44 +0100 Subject: [PATCH] don't fail in xrandr_facts.py if nvidia-smi is not available --- Manual.org | 3 +++ library/xrandr_facts.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Manual.org b/Manual.org index eb984b6..ea9c034 100644 --- a/Manual.org +++ b/Manual.org @@ -4232,6 +4232,9 @@ def collect_nvidia_data(): universal_newlines=True) except subprocess.CalledProcessError: pass + except OSError: + # nvidia-smi is not installed + pass else: for row in csv.DictReader(data.splitlines(), delimiter=',', skipinitialspace=True): name = row['name'] diff --git a/library/xrandr_facts.py b/library/xrandr_facts.py index 103ff27..2061290 100755 --- a/library/xrandr_facts.py +++ b/library/xrandr_facts.py @@ -197,6 +197,9 @@ def collect_nvidia_data(): universal_newlines=True) except subprocess.CalledProcessError: pass + except OSError: + # nvidia-smi is not installed + pass else: for row in csv.DictReader(data.splitlines(), delimiter=',', skipinitialspace=True): name = row['name']