]> git-server-git.apps.pok.os.sepia.ceph.com Git - remoto.git/commitdiff
fix option exit at process.check
authorLaoQi <qjqjqzy@gmail.com>
Tue, 5 Jan 2016 07:36:55 +0000 (15:36 +0800)
committerLaoQi <qjqjqzy@gmail.com>
Tue, 5 Jan 2016 07:36:55 +0000 (15:36 +0800)
remoto/process.py

index c6a67c7f4fe44be42014cead78f8f0ca10bb9427..4b3287c0645476f0093b85b159a34a19076948c7 100644 (file)
@@ -161,8 +161,9 @@ def check(conn, command, exit=False, timeout=None, **kw):
 
     conn.logger.info('Running command: %s' % ' '.join(admin_command(conn.sudo, command)))
     result = conn.execute(_remote_check, cmd=command, **kw)
+    response = None
     try:
-        return result.receive(timeout)
+        response = result.receive(timeout)
     except Exception as err:
         # the things we need to do here :(
         # because execnet magic, we cannot catch this as
@@ -185,3 +186,5 @@ def check(conn, command, exit=False, timeout=None, **kw):
                 )
     if exit:
         conn.exit()
+    return response
+