Browse Source

Wait for process to finish before trying to check exit status.

Dan Helfman 5 years ago
parent
commit
f7c93ea2e8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      borgmatic/execute.py

+ 2 - 2
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,