mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-12 07:55:23 +08:00
Make sure we always get str fn output
This commit is contained in:
parent
f4636dbd0e
commit
c4f5c72f2e
1 changed files with 5 additions and 3 deletions
|
@ -7,8 +7,8 @@ __intname__ = "npbackup.restic_wrapper"
|
||||||
__author__ = "Orsiris de Jong"
|
__author__ = "Orsiris de Jong"
|
||||||
__copyright__ = "Copyright (C) 2022-2024 NetInvent"
|
__copyright__ = "Copyright (C) 2022-2024 NetInvent"
|
||||||
__license__ = "GPL-3.0-only"
|
__license__ = "GPL-3.0-only"
|
||||||
__build__ = "2024110301"
|
__build__ = "2024121001"
|
||||||
__version__ = "2.3.3"
|
__version__ = "2.3.4"
|
||||||
|
|
||||||
|
|
||||||
from typing import Tuple, List, Optional, Callable, Union
|
from typing import Tuple, List, Optional, Callable, Union
|
||||||
|
@ -724,7 +724,9 @@ class ResticRunner:
|
||||||
decoder = msgspec.json.Decoder()
|
decoder = msgspec.json.Decoder()
|
||||||
ls_decoder = msgspec.json.Decoder(schema.LsNode)
|
ls_decoder = msgspec.json.Decoder(schema.LsNode)
|
||||||
is_first_line = True
|
is_first_line = True
|
||||||
|
# Make sure we always deal with str output (--has-recent-snapshot returns a datetime object)
|
||||||
|
if not isinstance(output, str):
|
||||||
|
output = str(output)
|
||||||
for line in output.split("\n"):
|
for line in output.split("\n"):
|
||||||
if not line:
|
if not line:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Reference in a new issue