mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-22 10:38:37 +00:00
LinuxDevice: Removed has_root method
Was not used anywhere and is_rooted should be used instead
This commit is contained in:
parent
2ff13089fd
commit
8bdffe6f9c
@ -685,15 +685,6 @@ class LinuxDevice(BaseLinuxDevice):
|
|||||||
|
|
||||||
# Execution
|
# Execution
|
||||||
|
|
||||||
def has_root(self):
|
|
||||||
try:
|
|
||||||
self.execute('ls /', as_root=True)
|
|
||||||
return True
|
|
||||||
except DeviceError as e:
|
|
||||||
if 'not in the sudoers file' not in e.message:
|
|
||||||
raise e
|
|
||||||
return False
|
|
||||||
|
|
||||||
def execute(self, command, timeout=default_timeout, check_exit_code=True, background=False,
|
def execute(self, command, timeout=default_timeout, check_exit_code=True, background=False,
|
||||||
as_root=False, strip_colors=True, **kwargs):
|
as_root=False, strip_colors=True, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user