ssh: fix exception type for missing device

This commit is contained in:
Roman Zeyde
2017-11-18 16:50:08 +02:00
parent c4dfca04f2
commit 1942e3999b

View File

@@ -135,7 +135,7 @@ def handle_connection_error(func):
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except IOError as e:
except device.interface.NotFoundError as e:
log.error('Connection error (try unplugging and replugging your device): %s', e)
return 1
return wrapper