mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-19 04:21:17 +00:00
Do not attempt to get_sysfile_value() as root on unrooted devices.
This commit is contained in:
parent
ce91e34f9f
commit
5abb42eab9
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user