mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-09-27 22:25:24 +00:00
resolve exit code for backup_from_stdin
This commit is contained in:
@@ -42,7 +42,11 @@ def backup_from_stdin(repository: str, filename: str, source_command: List[str])
|
||||
# pipe source command into dest command
|
||||
source_process = Popen(source_command, stdout=PIPE)
|
||||
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):
|
||||
|
Reference in New Issue
Block a user