Browse Source

fixup: only works for local repos

Thomas Waldmann 7 years ago
parent
commit
573733bc81
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/borg/archiver.py

+ 3 - 1
src/borg/archiver.py

@@ -1469,7 +1469,9 @@ class Archiver:
         repository.put(Manifest.MANIFEST_ID, data)
         repository.put(Manifest.MANIFEST_ID, data)
         # usually, a 0 byte (open for writing) segment file would be visible in the filesystem here.
         # usually, a 0 byte (open for writing) segment file would be visible in the filesystem here.
         # we write and close this file, to rather have a valid segment file on disk, before invoking the subprocess.
         # we write and close this file, to rather have a valid segment file on disk, before invoking the subprocess.
-        repository.io.close_segment()
+        # we can only do this for local repositories (with .io), though:
+        if hasattr(repository, 'io'):
+            repository.io.close_segment()
         try:
         try:
             # we exit with the return code we get from the subprocess
             # we exit with the return code we get from the subprocess
             return subprocess.call([args.command] + args.args)
             return subprocess.call([args.command] + args.args)