summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/op_mode/show_sensors.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/op_mode/show_sensors.py b/src/op_mode/show_sensors.py
index 365a358ac..54a0f52c9 100755
--- a/src/op_mode/show_sensors.py
+++ b/src/op_mode/show_sensors.py
@@ -28,22 +28,22 @@ if 'hypervisor' in cpu_info:
print('VyOS running under hypervisor, no sensors available!')
sys.exit(1)
-output,retcode = popen("sensors --no-adapter", stderr=DEVNULL)
+output, retcode = popen("sensors --no-adapter", stderr=DEVNULL)
if retcode == 0:
print (output)
sys.exit(0)
else:
- output,retcode = popen("sensors-detect --auto",stderr=DEVNULL)
- match = re.search(r'#----cut here----(.*)#----cut here----',output, re.DOTALL)
+ output, retcode = popen("sensors-detect --auto", stderr=DEVNULL)
+ match = re.search(r'#----cut here----(.*)#----cut here----', output,
+ re.DOTALL)
if match:
for module in match.group(0).split('\n'):
if not module.startswith("#"):
popen("modprobe {}".format(module.strip()))
- output,retcode = popen("sensors --no-adapter", stderr=DEVNULL)
+ output, retcode = popen("sensors --no-adapter", stderr=DEVNULL)
if retcode == 0:
- print (output)
+ print(output)
sys.exit(0)
-
-print ("No sensors found")
+print("No sensors found")
sys.exit(1)