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.
This commit is contained in:
parent
0cd246a6ce
commit
0de40067da
1 changed files with 3 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue