changeset 2387:a41d900d015c

dualsourcecache: simplify cachekey.clear We do not needs the super call anymore and we can make the reset case more explicit. So we do.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 17 May 2017 12:23:10 +0200
parents 47ee05940d7d
children 385156ab55b8
files hgext3rd/evolve/obscache.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/obscache.py	Wed May 17 11:58:48 2017 +0200
+++ b/hgext3rd/evolve/obscache.py	Wed May 17 12:23:10 2017 +0200
@@ -161,10 +161,10 @@
         """
         # /!\ IMPORTANT /!\
         # You must overide this method to actually
-        self._cachekey = self.emptykey if reset else None
-        s = super(dualsourcecache, self)
-        if util.safehasattr(s, 'clear') and callable(s.clear):
-            s.clear()
+        if reset:
+            self._cachekey = self.emptykey if reset else None
+        else:
+            self._cachekey = None
 
     def load(self, repo):
         """Load data from disk