Commit 8b59d0c4 authored by Wout De Nolf's avatar Wout De Nolf
Browse files

BaseHashSetting,OrderedHashSetting: remove code duplication

parent d65a84b7
......@@ -566,8 +566,7 @@ class BaseHashSetting(BaseSetting):
return f"<{type(self).__name__} name=%s value=%s>" % (, value)
def __delitem__(self, key):
cnx = self.connection
cnx.hdel(, key)
def __len__(self):
cnx = self.connection
......@@ -772,12 +771,6 @@ class OrderedHashSetting(BaseHashSetting):
def _name_order(self):
return self._name + ":creation_order"
def __delitem__(self, key):
def __len__(self):
return super().__len__()
def ttl(self, value=-1):
hash_ttl = super().ttl(value)
set_ttl = ttl_func(self._cnx(), self._name_order, value)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment