1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-06 10:50:51 +01: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:
Marc Bonnici 2018-04-20 17:04:26 +01:00 committed by setrofim
parent 58c0d30b26
commit bb3ae48d25
2 changed files with 2 additions and 4 deletions

View File

@ -25,9 +25,7 @@ class TargetError(DevlibError):
class TargetNotRespondingError(DevlibError):
"""The target is unresponsive."""
def __init__(self, target):
super(TargetNotRespondingError, self).__init__('Target {} is not responding.'.format(target))
pass
class HostError(DevlibError):

View File

@ -455,7 +455,7 @@ class Target(object):
return 1
except (TimeoutError, subprocess.CalledProcessError, TargetError):
if explode:
raise TargetNotRespondingError(self.conn.name)
raise TargetNotRespondingError('Target {} is not responding'.format(self.conn.name))
return 0
# process management