[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:
parent
4838cf862f
commit
9b63345b44
1 changed files with 1 additions and 3 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue