From 5d1be8a11af46cf9e24d1289f4f8bc007346d767 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 18 Nov 2017 14:51:38 +0100 Subject: [PATCH] remove permissive when permissive is empty --- tiramisu/storage/dictionary/setting.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tiramisu/storage/dictionary/setting.py b/tiramisu/storage/dictionary/setting.py index bfa00ff..ede22ee 100644 --- a/tiramisu/storage/dictionary/setting.py +++ b/tiramisu/storage/dictionary/setting.py @@ -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())