remove permissive when permissive is empty

This commit is contained in:
Emmanuel Garette 2017-11-18 14:51:38 +01:00
parent 9cba5ad29f
commit 5d1be8a11a
1 changed files with 5 additions and 1 deletions

View File

@ -62,7 +62,11 @@ class Permissives(Cache):
super(Permissives, self).__init__(storage)
def setpermissive(self, path, permissive):
self._permissives[path] = frozenset(permissive)
if not permissive:
if path in self._permissives:
del self._permissives[path]
else:
self._permissives[path] = permissive
def getpermissive(self, path=None):
return self._permissives.get(path, frozenset())