didnot getattr a second time in find if not needed
authorEmmanuel Garette <egarette@cadoles.com>
Sun, 22 Sep 2013 19:54:07 +0000 (21:54 +0200)
committerEmmanuel Garette <egarette@cadoles.com>
Sun, 22 Sep 2013 19:54:07 +0000 (21:54 +0200)
tiramisu/config.py

index 261f6ed..f1b2851 100644 (file)
@@ -325,15 +325,15 @@ class SubConfig(object):
                 continue
             if not _filter_by_value():
                 continue
                 continue
             if not _filter_by_value():
                 continue
+            if not _filter_by_type():
+                continue
             #remove option with propertyerror, ...
             #remove option with propertyerror, ...
-            if check_properties:
+            if byvalue is None and check_properties:
                 try:
                     value = getattr(self, path)
                 except PropertiesOptionError:
                     # a property restricts the access of the value
                     continue
                 try:
                     value = getattr(self, path)
                 except PropertiesOptionError:
                     # a property restricts the access of the value
                     continue
-            if not _filter_by_type():
-                continue
             if type_ == 'value':
                 retval = value
             elif type_ == 'path':
             if type_ == 'value':
                 retval = value
             elif type_ == 'path':