From f7c93ea2e888cf731fd1ec8ff3f0182b82bf5b67 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sat, 9 May 2020 23:09:48 -0700 Subject: [PATCH] Wait for process to finish before trying to check exit status. --- borgmatic/execute.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/borgmatic/execute.py b/borgmatic/execute.py index 96450d6..b8bb91a 100644 --- a/borgmatic/execute.py +++ b/borgmatic/execute.py @@ -206,12 +206,12 @@ def execute_command( return process if do_not_capture: - exit_code = process.poll() + exit_code = process.wait() if exit_code_indicates_error(exit_code, error_on_warnings): raise subprocess.CalledProcessError(exit_code, process_command(process)) - return + return None log_output( process,