mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-07-10 09:03:36 +01:00
Do not attempt to get_sysfile_value() as root on unrooted devices.
This commit is contained in:
@ -216,7 +216,7 @@ class BaseLinuxDevice(Device): # pylint: disable=abstract-method
|
|||||||
as a string.
|
as a string.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
output = self.execute('cat \'{}\''.format(sysfile), as_root=True).strip() # pylint: disable=E1103
|
output = self.execute('cat \'{}\''.format(sysfile), as_root=self.is_rooted).strip() # pylint: disable=E1103
|
||||||
if kind:
|
if kind:
|
||||||
return kind(output)
|
return kind(output)
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user