From e7c70127bfc165b2202c44a4bd8c3e12a166fcd1 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 20 Sep 2017 18:14:01 +0530 Subject: [PATCH] fakessh: return child exit status --- mitogen/fakessh.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mitogen/fakessh.py b/mitogen/fakessh.py index 2c797763..65861f0b 100644 --- a/mitogen/fakessh.py +++ b/mitogen/fakessh.py @@ -328,7 +328,11 @@ def run(dest, router, args, deadline=None): :param mitogen.core.Router router: :param list[str] args: - Command line arguments for local program, e.g. ``['rsync', '/tmp', 'remote:/tmp']`` + Command line arguments for local program, e.g. + ``['rsync', '/tmp', 'remote:/tmp']`` + + :returns: + Exit status of the child process. """ context_id = router.context_id_counter.next() fakessh = mitogen.master.Context(router, context_id) @@ -376,6 +380,6 @@ def run(dest, router, args, deadline=None): }) proc = subprocess.Popen(args, env=env) - proc.wait() + return proc.wait() finally: shutil.rmtree(tmp_path)