mirror of
https://github.com/ARM-software/devlib.git
synced 2025-03-04 09:17:51 +00:00
exception: Update "TargetNotRespondingError" syntax.
Update the syntax of the TargetNotRespondingError to conform with the other exceptions of expecting a full message to be displayed rather than just a target name.
This commit is contained in:
parent
58c0d30b26
commit
bb3ae48d25
@ -25,9 +25,7 @@ class TargetError(DevlibError):
|
|||||||
|
|
||||||
class TargetNotRespondingError(DevlibError):
|
class TargetNotRespondingError(DevlibError):
|
||||||
"""The target is unresponsive."""
|
"""The target is unresponsive."""
|
||||||
|
pass
|
||||||
def __init__(self, target):
|
|
||||||
super(TargetNotRespondingError, self).__init__('Target {} is not responding.'.format(target))
|
|
||||||
|
|
||||||
|
|
||||||
class HostError(DevlibError):
|
class HostError(DevlibError):
|
||||||
|
@ -455,7 +455,7 @@ class Target(object):
|
|||||||
return 1
|
return 1
|
||||||
except (TimeoutError, subprocess.CalledProcessError, TargetError):
|
except (TimeoutError, subprocess.CalledProcessError, TargetError):
|
||||||
if explode:
|
if explode:
|
||||||
raise TargetNotRespondingError(self.conn.name)
|
raise TargetNotRespondingError('Target {} is not responding'.format(self.conn.name))
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
# process management
|
# process management
|
||||||
|
Loading…
x
Reference in New Issue
Block a user