don't raise if check_disabled is True
authorEmmanuel Garette <egarette@cadoles.com>
Mon, 22 Apr 2013 18:42:54 +0000 (20:42 +0200)
committerEmmanuel Garette <egarette@cadoles.com>
Mon, 22 Apr 2013 18:42:54 +0000 (20:42 +0200)
tiramisu/autolib.py

index e92c663..6a659a3 100644 (file)
@@ -44,9 +44,11 @@ def carry_out_calculation(name, config, callback, callback_params):
     for key, values in callback_params.items():
         for value in values:
             if type(value) == tuple:
+                path, check_disabled = value
                 if config is None:
+                    if check_disabled:
+                        continue
                     raise ConfigError(_('no config specified but needed'))
-                path, check_disabled = value
                 try:
                     opt_value = config._getattr(path, force_permissive=True)
                     opt = config.unwrap_from_path(path)