]> git-server-git.apps.pok.os.sepia.ceph.com Git - remoto.git/commitdiff
avoid doing a bare return
authorAlfredo Deza <alfredo@deza.pe>
Tue, 22 Mar 2016 13:03:02 +0000 (09:03 -0400)
committerAlfredo Deza <alfredo@deza.pe>
Tue, 22 Mar 2016 13:03:02 +0000 (09:03 -0400)
clients will expect a three-item tuple

remoto/process.py

index 4b3287c0645476f0093b85b159a34a19076948c7..38bc5a24bb1524ff7cdd6f8e38bcb0b3cbd5b47e 100644 (file)
@@ -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)