lvm_thin: _remove_revisions() on revisions_to_keep==0
If revisions_to_keep is 0, it may nevertheless have been > 0 before, so it makes sense to call _remove_revisions() and hold back none (not all) of the revisions in this case.
This commit is contained in:
parent
ade49d44b7
commit
f6542effc5
@ -262,7 +262,8 @@ class ThinVolume(qubes.storage.Volume):
|
||||
if revisions is None:
|
||||
revisions = sorted(self.revisions.items(),
|
||||
key=operator.itemgetter(1))
|
||||
revisions = revisions[:-self.revisions_to_keep]
|
||||
# pylint: disable=invalid-unary-operand-type
|
||||
revisions = revisions[:(-self.revisions_to_keep) or None]
|
||||
revisions = [rev_id for rev_id, _ in revisions]
|
||||
|
||||
for rev_id in revisions:
|
||||
|
Loading…
Reference in New Issue
Block a user