mirror of https://github.com/borgbackup/borg.git
repository: fix assert expression to not have a side effect
lgtm: This 'assert' statement contains an expression which may have side effects.
This commit is contained in:
parent
98090102c2
commit
b7b428edc2
|
@ -642,7 +642,8 @@ class Repository:
|
|||
# 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 New Issue