From 9a2c4133721b91a42a3d614be27a95d7dbea392e Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Wed, 24 Jun 2020 17:04:07 +0100 Subject: [PATCH] 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. --- devlib/target.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlib/target.py b/devlib/target.py index c1f9ebc..2ca4871 100644 --- a/devlib/target.py +++ b/devlib/target.py @@ -550,7 +550,7 @@ class Target(object): def reset(self): try: 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 pass self.conn.connected_as_root = None