Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nigel Kukard
awit-backstep
Commits
966fa0b9
Commit
966fa0b9
authored
May 02, 2022
by
Nigel Kukard
Browse files
borg: Take another shot at detecting the archive info
parent
730c6b0b
Pipeline
#7157
passed with stage
in 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
awit_backstep/methods/borg.py
View file @
966fa0b9
...
...
@@ -254,8 +254,12 @@ class BorgBackup: # noqa: R0902 pylint: disable=too-many-instance-attributes
raise
BackupError
(
f
"Error piping data from child process to Borg, exit code
{
result_code_pp
}
"
)
from
None
# Loop with output
for
line
in
chunks
(
process
.
stdout
,
delim
=
"
\n\r
"
):
# Parse output if we don't have stats yet
if
not
stats
:
# End of the actual backup process is a { , which is the beginning of the archive info
if
line
==
"{"
:
summary_output
+=
line
continue
# Parse output if we've not reached the end of our output yet
if
not
summary_output
:
self
.
_parse_output
(
line
,
stats
,
stats_state
)
# Once we have stats, save the rest in our summary...
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment