mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
target/reset: Ignore all TargetError
s when rebooting
Some targets can thrown stable errors in addition to transient errors when executing the `reboot` command. We expect this command to not always complete cleanly so ignore all target errors.
This commit is contained in:
parent
3cb2793e51
commit
9a2c413372
@ -550,7 +550,7 @@ class Target(object):
|
|||||||
def reset(self):
|
def reset(self):
|
||||||
try:
|
try:
|
||||||
self.execute('reboot', as_root=self.needs_su, timeout=2)
|
self.execute('reboot', as_root=self.needs_su, timeout=2)
|
||||||
except (DevlibTransientError, subprocess.CalledProcessError):
|
except (TargetError, subprocess.CalledProcessError):
|
||||||
# on some targets "reboot" doesn't return gracefully
|
# on some targets "reboot" doesn't return gracefully
|
||||||
pass
|
pass
|
||||||
self.conn.connected_as_root = None
|
self.conn.connected_as_root = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user