1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

target/reset: Ignore all TargetErrors 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:
Marc Bonnici 2020-06-24 17:04:07 +01:00 committed by setrofim
parent 3cb2793e51
commit 9a2c413372

View File

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