From 248e9ba929800a3a55c6be701004f0b56819ddf7 Mon Sep 17 00:00:00 2001 From: LaoQi Date: Tue, 5 Jan 2016 15:36:55 +0800 Subject: [PATCH] fix option exit at process.check --- remoto/process.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remoto/process.py b/remoto/process.py index c6a67c7..4b3287c 100644 --- a/remoto/process.py +++ b/remoto/process.py @@ -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 + -- 2.47.3