[modules/nvidiagpu] Fix double "not found" check

refactor error: it should be *either* "not found" in string *OR*
string.startswith("something"), not both.

fixes #617
This commit is contained in:
tobi-wan-kenobi 2020-05-02 09:49:28 +02:00
parent 4838cf862f
commit 9b63345b44

View file

@ -25,9 +25,7 @@ class Module(core.module.Module):
return self.__utilization return self.__utilization
def hidden(self): def hidden(self):
if "not found" in self._utilization.startswith("not found"): return "not found" in self.__utilization
return True
return False
def update(self): def update(self):
sp = util.cli.execute('nvidia-smi -q', ignore_errors=True) sp = util.cli.execute('nvidia-smi -q', ignore_errors=True)