From 0de40067da8c6f19b1f33ee39e15738d4f653860 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Thu, 22 Feb 2024 14:55:05 -0600 Subject: [PATCH] video: Don't show error when trying to read radeon files When the plugin supports non-radeon files it shouldn't show errors trying to read values. --- tuned/plugins/plugin_video.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tuned/plugins/plugin_video.py b/tuned/plugins/plugin_video.py index e6c3d0b..5c2405c 100644 --- a/tuned/plugins/plugin_video.py +++ b/tuned/plugins/plugin_video.py @@ -115,6 +115,9 @@ class VideoPlugin(base.Plugin): @command_get("radeon_powersave") def _get_radeon_powersave(self, device, ignore_missing = False): sys_files = self._files(device) + if not os.path.exists(sys_files["method"]): + log.debug("radeon_powersave is not supported on '%s'" % device) + return None method = self._cmd.read_file(sys_files["method"], no_error=ignore_missing).strip() if method == "profile": return self._cmd.read_file(sys_files["profile"]).strip()