Browse Source

Fix type issue

master
Jim Paris 2 years ago
parent
commit
738573a292
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      backup.py

+ 3
- 1
backup.py View File

@@ -113,7 +113,7 @@ class Backup:
sys.stderr.write(f"\033[1;{c}m{letter}:\033[22m {msg}\033[0m\n")
self.logs.append((letter, msg))

def run(self, outfile: typing.BinaryIO):
def run(self, outfile: typing.IO[bytes]):
self.outfile = outfile
# Base should not end with a slash, but full path should
if self.config.root.endswith(b'/'):
@@ -247,6 +247,8 @@ def main(argv: list[str]):
"--paths-delimiter", "\\0",
"::'{hostname}-{now:%Y%m%d-%H%M%S}'"],
stdin=subprocess.PIPE)
if borg.stdin is None:
raise Exception("no pipe")
backup.run(borg.stdin)
borg.stdin.close()
ret = borg.wait()


Loading…
Cancel
Save