From: Alfredo Deza Date: Tue, 22 Mar 2016 13:03:02 +0000 (-0400) Subject: avoid doing a bare return X-Git-Tag: 0.0.28~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=38f4d7a6f9b004c7966d6635eb694b4a72128bc3;p=remoto.git avoid doing a bare return clients will expect a three-item tuple --- diff --git a/remoto/process.py b/remoto/process.py index 4b3287c..38bc5a2 100644 --- a/remoto/process.py +++ b/remoto/process.py @@ -171,7 +171,9 @@ def check(conn, command, exit=False, timeout=None, **kw): if err.__class__.__name__ == 'TimeoutError': msg = 'No data was received after %s seconds, disconnecting...' % timeout conn.logger.warning(msg) - return + # there is no stdout, stderr, or exit code but make the exit code + # an error condition (non-zero) regardless + return [], [], -1 else: remote_trace = traceback.format_exc() remote_error = RemoteError(remote_trace)