Merge branch '_getattr'
authorEmmanuel Garette <egarette@cadoles.com>
Tue, 1 Apr 2014 07:51:43 +0000 (09:51 +0200)
committerEmmanuel Garette <egarette@cadoles.com>
Tue, 1 Apr 2014 07:51:43 +0000 (09:51 +0200)
1  2 
tiramisu/config.py

diff --combined tiramisu/config.py
@@@ -214,10 -214,11 +214,11 @@@ class SubConfig(object)
      def __getattr__(self, name):
          return self.getattr(name)
  
-     def _getattr(self, name):
+     def _getattr(self, name, force_permissive=False, force_properties=None,
+                  validate=True):
          """use getattr instead of _getattr
          """
-         return self.getattr(name)
+         return self.getattr(name, force_permissive, force_properties, validate)
  
      def getattr(self, name, force_permissive=False, force_properties=None,
                  validate=True):
@@@ -502,15 -503,14 +503,15 @@@ class _CommonConfig(SubConfig)
          "read write is a global config's setting, see `settings.py`"
          self.cfgimpl_get_settings().read_write()
  
 -    def getowner(self, opt):
 +    def getowner(self, opt, force_permissive=False):
          """convenience method to retrieve an option's owner
          from the config itself
          """
          if not isinstance(opt, Option) and not isinstance(opt, SymLinkOption):
              raise TypeError(_('opt in getowner must be an option not {0}'
                                '').format(type(opt)))
 -        return self.cfgimpl_get_values().getowner(opt)
 +        return self.cfgimpl_get_values().getowner(opt,
 +                                                  force_permissive=force_permissive)
  
      def unwrap_from_path(self, path, force_permissive=False):
          """convenience method to extract and Option() object from the Config()