From 44965bf7621169f79cf31b60131b1df6912b8111 Mon Sep 17 00:00:00 2001 From: lanxu Date: Sun, 19 Feb 2017 23:30:12 +0200 Subject: [PATCH] GPU temp script is now checks commands --- getGPUTemp.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/getGPUTemp.py b/getGPUTemp.py index 21f52f9..9aa879d 100755 --- a/getGPUTemp.py +++ b/getGPUTemp.py @@ -14,8 +14,13 @@ aticonfig_available = is_exe("/usr/bin/aticonfig") sensors_available = is_exe("/usr/bin/sensors") if sensors_available: - #command = "sensors radeon-pci-* | grep temp1" - command = "sensors thinkpad-isa-* | grep ATI" + commands = ["sensors radeon-pci-* | grep temp1", "sensors thinkpad-isa-* | grep ATI"] + + for try_command in commands: + command = try_command + return_command = check_output(command, shell=True) + if return_command is not None: + break if aticonfig_available: command = "aticonfig --odgt"