1
0
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:
Sergei Trofimov 2015-09-18 09:02:47 +01:00
parent ce91e34f9f
commit 5abb42eab9

View File

@ -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: