Merge branch 'master' into orm
[tiramisu.git] / tiramisu / setting.py
index 9e9926a..fc4241d 100644 (file)
@@ -372,7 +372,7 @@ class Settings(object):
 
     def _getproperties(self, opt=None, path=None, is_apply_req=True):
         if opt is None:
-            props = self._p_.getproperties(path, default_properties)
+            props = copy(self._p_.getproperties(path, default_properties))
         else:
             if path is None:
                 raise ValueError(_('if opt is not None, path should not be'
@@ -383,8 +383,8 @@ class Settings(object):
                     ntime = int(time())
                 is_cached, props = self._p_.getcache(path, ntime)
                 if is_cached:
-                    return props
-            props = self._p_.getproperties(path, opt._properties)
+                    return copy(props)
+            props = copy(self._p_.getproperties(path, opt._properties))
             if is_apply_req:
                 props |= self.apply_requires(opt, path)
             if 'cache' in self:
@@ -447,8 +447,8 @@ class Settings(object):
                          (typically with the `frozen` property)
         """
         # opt properties
-        properties = copy(self._getproperties(opt_or_descr, path))
-        self_properties = copy(self._getproperties())
+        properties = self._getproperties(opt_or_descr, path)
+        self_properties = self._getproperties()
         # remove opt permissive
         # permissive affect option's permission with or without permissive
         # global property