remove permissive when permissive is empty
This commit is contained in:
parent
9cba5ad29f
commit
5d1be8a11a
|
@ -62,7 +62,11 @@ class Permissives(Cache):
|
||||||
super(Permissives, self).__init__(storage)
|
super(Permissives, self).__init__(storage)
|
||||||
|
|
||||||
def setpermissive(self, path, permissive):
|
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):
|
def getpermissive(self, path=None):
|
||||||
return self._permissives.get(path, frozenset())
|
return self._permissives.get(path, frozenset())
|
||||||
|
|
Loading…
Reference in New Issue