[modules/sensors] Use thermal zone, if specified on commandline

fixes #298
This commit is contained in:
Tobias Witek 2018-09-24 18:15:04 +02:00
parent e80ae8b91e
commit 7af04b0556

View file

@ -32,6 +32,10 @@ class Module(bumblebee.engine.Module):
self.determine_method() self.determine_method()
def determine_method(self): def determine_method(self):
if self.parameter("path") != None:
self.use_sensors = False # use thermal zone
else:
# try to use output of sensors -u
try: try:
output = bumblebee.util.execute("sensors -u") output = bumblebee.util.execute("sensors -u")
self.use_sensors = True self.use_sensors = True