mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
target: Return a bool in Target.check_responsive()
Since bool is a subclass of int, turning 0 into False and 1 into True should not break any user code.
This commit is contained in:
parent
cf26dee308
commit
2bf4d8a433
@ -546,11 +546,11 @@ class Target(object):
|
||||
def check_responsive(self, explode=True):
|
||||
try:
|
||||
self.conn.execute('ls /', timeout=5)
|
||||
return 1
|
||||
return True
|
||||
except (DevlibTransientError, subprocess.CalledProcessError):
|
||||
if explode:
|
||||
raise TargetNotRespondingError('Target {} is not responding'.format(self.conn.name))
|
||||
return 0
|
||||
return False
|
||||
|
||||
# process management
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user