mirror of
https://github.com/netinvent/npbackup.git
synced 2025-11-10 06:01:39 +08:00
CLI: Flush stdout buffer after dump command
This commit is contained in:
parent
1269f80954
commit
068a1e2d75
1 changed files with 3 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ __intname__ = "npbackup.restic_wrapper"
|
|||
__author__ = "Orsiris de Jong"
|
||||
__copyright__ = "Copyright (C) 2022-2025 NetInvent"
|
||||
__license__ = "GPL-3.0-only"
|
||||
__build__ = "2025090901"
|
||||
__build__ = "2025091201"
|
||||
__version__ = "2.7.3"
|
||||
|
||||
|
||||
|
|
@ -1382,6 +1382,8 @@ class ResticRunner:
|
|||
# We need to write binary data directly to stdout on success
|
||||
# Dump should only be used by CLI
|
||||
sys.stdout.buffer.write(output)
|
||||
# Also make sure we flush said buffer
|
||||
sys.stdout.buffer.flush()
|
||||
msg = f"File {path} successfully dumped"
|
||||
else:
|
||||
msg = f"Cannot dump file {path}:\n {output}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue