mock qubesdb.rm()

This commit is contained in:
3hhh 2021-05-15 12:33:24 +02:00
parent 196014831b
commit dda500b837
No known key found for this signature in database
GPG Key ID: EB03A691DB2F0833

View File

@ -29,6 +29,14 @@ class DummyQubesDB(object):
except KeyError:
return None
def rm(self, path):
if path.endswith('/'):
for key in self.entries:
if key.startswith(path):
self.entries.pop(key)
else:
self.entries.pop(path)
def multiread(self, prefix):
result = {}
for key, value in self.entries.items():