Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
'--format=json',
]
- out, err, code = process.check(
- conn,
- command,
- )
+ try:
+ out, err, code = process.check(
+ conn,
+ command,
+ )
+ except TypeError:
+ # XXX This is a bug in remoto. If the other end disconnects with a timeout
+ # it will return a None, and here we are expecting a 3 item tuple, not a None
+ # so it will break with a TypeError. Once remoto fixes this, we no longer need
+ # this try/except.
+ return {}
try:
loaded_json = json.loads(''.join(out))