mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-21 21:57:36 +00:00
commit
4fa8805407
4 changed files with 9 additions and 8 deletions
4
setup.py
4
setup.py
|
@ -368,12 +368,12 @@ def write_row_separator():
|
|||
# "+ 1" because we want a space between the cell contents and the delimiting "|" in the output
|
||||
column_widths[i] = max(column_widths[i], len(cells[i]) + 1)
|
||||
|
||||
for columns, *cells in rows:
|
||||
for columns, *original_cells in rows:
|
||||
write_row_separator()
|
||||
# If a cell contains newlines, then the row must be split up in individual rows
|
||||
# where each cell contains no newline.
|
||||
rowspanning_cells = []
|
||||
original_cells = list(cells)
|
||||
original_cells = list(original_cells)
|
||||
while any('\n' in cell for cell in original_cells):
|
||||
cell_bloc = []
|
||||
for i, cell in enumerate(original_cells):
|
||||
|
|
|
@ -172,11 +172,11 @@ def __exit__(self, exc_type, exc_val, exc_tb):
|
|||
def backup_io_iter(iterator):
|
||||
backup_io.op = 'read'
|
||||
while True:
|
||||
try:
|
||||
with backup_io:
|
||||
with backup_io:
|
||||
try:
|
||||
item = next(iterator)
|
||||
except StopIteration:
|
||||
return
|
||||
except StopIteration:
|
||||
return
|
||||
yield item
|
||||
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
# MAX_OBJECT_SIZE = <20 MiB (MAX_DATA_SIZE) + 41 bytes for a Repository PUT header, which consists of
|
||||
# a 1 byte tag ID, 4 byte CRC, 4 byte size and 32 bytes for the ID.
|
||||
MAX_OBJECT_SIZE = MAX_DATA_SIZE + 41 # see LoggedIO.put_header_fmt.size assertion in repository module
|
||||
assert MAX_OBJECT_SIZE == 20971520 == 20 * 1024 * 1024
|
||||
assert MAX_OBJECT_SIZE == 20 * 1024 * 1024
|
||||
|
||||
# borg.remote read() buffer size
|
||||
BUFSIZE = 10 * 1024 * 1024
|
||||
|
|
|
@ -642,7 +642,8 @@ def complete_xfer(intermediate=True):
|
|||
# get rid of the old, sparse, unused segments. free space.
|
||||
for segment in unused:
|
||||
logger.debug('complete_xfer: deleting unused segment %d', segment)
|
||||
assert self.segments.pop(segment) == 0, 'Corrupted segment reference count - corrupted index or hints'
|
||||
count = self.segments.pop(segment)
|
||||
assert count == 0, 'Corrupted segment reference count - corrupted index or hints'
|
||||
self.io.delete_segment(segment)
|
||||
del self.compact[segment]
|
||||
unused = []
|
||||
|
|
Loading…
Reference in a new issue