resolve exit code for backup_from_stdin
This commit is contained in:
parent
ddb08c8a62
commit
ed46a472a1
|
@ -42,7 +42,11 @@ def backup_from_stdin(repository: str, filename: str, source_command: List[str])
|
||||||
# pipe source command into dest command
|
# pipe source command into dest command
|
||||||
source_process = Popen(source_command, stdout=PIPE)
|
source_process = Popen(source_command, stdout=PIPE)
|
||||||
dest_process = Popen(dest_command, stdin=source_process.stdout)
|
dest_process = Popen(dest_command, stdin=source_process.stdout)
|
||||||
return dest_process.communicate()
|
dest_process.communicate()
|
||||||
|
|
||||||
|
# Ensure both processes exited with code 0
|
||||||
|
source_exit, dest_exit = source_process.poll(), dest_process.poll()
|
||||||
|
return source_exit == 0 and dest_exit == 0
|
||||||
|
|
||||||
|
|
||||||
def snapshots(repository: str):
|
def snapshots(repository: str):
|
||||||
|
|
Loading…
Reference in New Issue