1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-22 07:43:06 +00:00

hashindex: simplify .pop

This commit is contained in:
Thomas Waldmann 2024-10-26 00:37:00 +02:00
parent bdf2602e7c
commit 3c794fa980
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -141,13 +141,11 @@ class NSIndex1:
def pop(self, key, default=_NoDefault):
try:
value = self[key]
del self[key]
return value
return self.ht.pop(key)
except KeyError:
if default != _NoDefault:
return default
raise
if default is _NoDefault:
raise
return default
def iteritems(self, marker=None):
do_yield = marker is None