Arity change, remove force_properties:
[tiramisu.git] / tiramisu / config.py
index 04c9cb9..b6e919b 100644 (file)
@@ -62,14 +62,12 @@ class SubConfig(object):
         "remove cache (in context)"
         self._cfgimpl_get_context().cfgimpl_reset_cache(only_expired, only)
 
-    def cfgimpl_get_home_by_path(self, path, force_permissive=False,
-                                 force_properties=None):
+    def cfgimpl_get_home_by_path(self, path, force_permissive=False):
         """:returns: tuple (config, name)"""
         path = path.split('.')
         for step in path[:-1]:
             self = self.getattr(step,
-                                force_permissive=force_permissive,
-                                force_properties=force_properties)
+                                force_permissive=force_permissive)
         return self, path[-1]
 
     def __hash__(self):
@@ -214,29 +212,24 @@ class SubConfig(object):
     def __getattr__(self, name):
         return self.getattr(name)
 
-    def _getattr(self, name, force_permissive=False, force_properties=None,
-                 validate=True):
+    def _getattr(self, name, force_permissive=False, validate=True):
         """use getattr instead of _getattr
         """
-        return self.getattr(name, force_permissive, force_properties, validate)
+        return self.getattr(name, force_permissive, validate)
 
-    def getattr(self, name, force_permissive=False, force_properties=None,
-                validate=True):
+    def getattr(self, name, force_permissive=False, validate=True):
         """
         attribute notation mechanism for accessing the value of an option
         :param name: attribute name
         :return: option's value if name is an option name, OptionDescription
                  otherwise
         """
-        #FIXME force_properties vraiment utile maintenant ?
         # attribute access by passing a path,
         # for instance getattr(self, "creole.general.family.adresse_ip_eth0")
         if '.' in name:
             homeconfig, name = self.cfgimpl_get_home_by_path(
-                name, force_permissive=force_permissive,
-                force_properties=force_properties)
+                name, force_permissive=force_permissive)
             return homeconfig.getattr(name, force_permissive=force_permissive,
-                                      force_properties=force_properties,
                                       validate=validate)
         opt_or_descr = getattr(self.cfgimpl_get_description(), name)
         if self._impl_path is None:
@@ -251,19 +244,16 @@ class SubConfig(object):
             path = context.cfgimpl_get_description().impl_get_path_by_opt(
                 opt_or_descr._opt)
             return context.getattr(path, validate=validate,
-                                   force_properties=force_properties,
                                    force_permissive=force_permissive)
         elif isinstance(opt_or_descr, OptionDescription):
             self.cfgimpl_get_settings().validate_properties(
                 opt_or_descr, True, False, path=subpath,
-                force_permissive=force_permissive,
-                force_properties=force_properties)
+                force_permissive=force_permissive)
             return SubConfig(opt_or_descr, self._impl_context, subpath)
         else:
             return self.cfgimpl_get_values()._get_cached_item(
                 opt_or_descr, path=subpath,
                 validate=validate,
-                force_properties=force_properties,
                 force_permissive=force_permissive)
 
     def find(self, bytype=None, byname=None, byvalue=None, type_='option',