mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-30 11:11:28 +00:00
fixup rename
This commit is contained in:
parent
26bf500566
commit
7db952ab7f
2 changed files with 6 additions and 6 deletions
|
@ -67,7 +67,7 @@ def backup_io():
|
|||
raise BackupOSError(os_error) from os_error
|
||||
|
||||
|
||||
def input_io_iter(iterator):
|
||||
def backup_io_iter(iterator):
|
||||
while True:
|
||||
try:
|
||||
with backup_io():
|
||||
|
@ -552,7 +552,7 @@ def process_stdin(self, path, cache):
|
|||
uid, gid = 0, 0
|
||||
fd = sys.stdin.buffer # binary
|
||||
chunks = []
|
||||
for chunk in input_io_iter(self.chunker.chunkify(fd)):
|
||||
for chunk in backup_io_iter(self.chunker.chunkify(fd)):
|
||||
chunks.append(cache.add_chunk(self.key.id_hash(chunk), chunk, self.stats))
|
||||
self.stats.nfiles += 1
|
||||
t = int_to_bigint(int(time.time()) * 1000000000)
|
||||
|
@ -604,7 +604,7 @@ def process_file(self, path, st, cache, ignore_inode=False):
|
|||
fh = Archive._open_rb(path)
|
||||
with os.fdopen(fh, 'rb') as fd:
|
||||
chunks = []
|
||||
for chunk in input_io_iter(self.chunker.chunkify(fd, fh)):
|
||||
for chunk in backup_io_iter(self.chunker.chunkify(fd, fh)):
|
||||
chunks.append(cache.add_chunk(self.key.id_hash(chunk), chunk, self.stats))
|
||||
if self.show_progress:
|
||||
self.stats.show_progress(item=item, dt=0.2)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
import pytest
|
||||
|
||||
from ..archive import Archive, CacheChunkBuffer, RobustUnpacker, valid_msgpacked_dict, ITEM_KEYS
|
||||
from ..archive import BackupOSError, backup_io, input_io_iter
|
||||
from ..archive import BackupOSError, backup_io, backup_io_iter
|
||||
from ..key import PlaintextKey
|
||||
from ..helpers import Manifest
|
||||
from . import BaseTestCase
|
||||
|
@ -164,9 +164,9 @@ def __next__(self):
|
|||
|
||||
oserror_iterator = Iterator(OSError)
|
||||
with pytest.raises(BackupOSError):
|
||||
for _ in input_io_iter(oserror_iterator):
|
||||
for _ in backup_io_iter(oserror_iterator):
|
||||
pass
|
||||
|
||||
normal_iterator = Iterator(StopIteration)
|
||||
for _ in input_io_iter(normal_iterator):
|
||||
for _ in backup_io_iter(normal_iterator):
|
||||
assert False, 'StopIteration handled incorrectly'
|
||||
|
|
Loading…
Reference in a new issue