mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-07 05:30:44 +00:00
Merge pull request #97 from marcbonnici/invalidate_as_root
Target: Invalidates _connected_as_root on reboot or reset.
This commit is contained in:
commit
32a975be74
@ -269,6 +269,7 @@ class Target(object):
|
|||||||
timeout = max(timeout - reset_delay, 10)
|
timeout = max(timeout - reset_delay, 10)
|
||||||
if self.has('boot'):
|
if self.has('boot'):
|
||||||
self.boot() # pylint: disable=no-member
|
self.boot() # pylint: disable=no-member
|
||||||
|
self._connected_as_root = None
|
||||||
if connect:
|
if connect:
|
||||||
self.connect(timeout=timeout)
|
self.connect(timeout=timeout)
|
||||||
|
|
||||||
@ -359,6 +360,7 @@ class Target(object):
|
|||||||
except (TargetError, TimeoutError, subprocess.CalledProcessError):
|
except (TargetError, TimeoutError, subprocess.CalledProcessError):
|
||||||
# on some targets "reboot" doesn't return gracefully
|
# on some targets "reboot" doesn't return gracefully
|
||||||
pass
|
pass
|
||||||
|
self._connected_as_root = None
|
||||||
|
|
||||||
def check_responsive(self):
|
def check_responsive(self):
|
||||||
try:
|
try:
|
||||||
@ -841,6 +843,7 @@ class AndroidTarget(Target):
|
|||||||
except (TargetError, TimeoutError, subprocess.CalledProcessError):
|
except (TargetError, TimeoutError, subprocess.CalledProcessError):
|
||||||
# on some targets "reboot" doesn't return gracefully
|
# on some targets "reboot" doesn't return gracefully
|
||||||
pass
|
pass
|
||||||
|
self._connected_as_root = None
|
||||||
|
|
||||||
def connect(self, timeout=10, check_boot_completed=True): # pylint: disable=arguments-differ
|
def connect(self, timeout=10, check_boot_completed=True): # pylint: disable=arguments-differ
|
||||||
start = time.time()
|
start = time.time()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user