changeset 2734:9702025f6dff

core (memory/persistent): new LazyPersistentBinaryDict.remove method
author Goffi <goffi@goffi.org>
date Wed, 02 Jan 2019 18:24:14 +0100
parents e347e32aa07f
children ba74914277cf
files sat/memory/persistent.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sat/memory/persistent.py	Wed Jan 02 18:22:30 2019 +0100
+++ b/sat/memory/persistent.py	Wed Jan 02 18:24:14 2019 +0100
@@ -241,3 +241,11 @@
         @return: deferred fired when data is actually saved
         """
         return self.storage.setPrivateValue(self.namespace, name, value, self.binary, self.profile)
+
+    def remove(self, key):
+        """Delete a key from sotrage, and return a deferred called when it's done
+
+        @param key(unicode): key to delete
+        @return (D): A deferred fired when delete is done
+        """
+        return self.storage.delPrivateValue(self.namespace, key, self.binary, self.profile)