add validation upon mandatory options function
authorgwen <gremond@cadoles.com>
Tue, 24 Jul 2012 13:35:44 +0000 (15:35 +0200)
committergwen <gremond@cadoles.com>
Tue, 24 Jul 2012 13:35:44 +0000 (15:35 +0200)
tiramisu/config.py

index 5a0c748..c691bb7 100644 (file)
@@ -536,5 +536,11 @@ def make_dict(config, flatten=False):
             pass # this just a hidden or disabled option  
     options = dict(pathsvalues)
     return options
-# ____________________________________________________________
 
+def mandatory_warnings(config):
+    for path in config.getpaths():
+        try:
+            value = getattr(config, path)            
+        except MandatoryError:
+            yield path
+