Browse Source

bug fix on validator (syntax)

Roland Haroutiounian 8 years ago
parent
commit
ccb643a4aa
1 changed files with 9 additions and 9 deletions
  1. 9
    9
      lodel/settings/validator.py

+ 9
- 9
lodel/settings/validator.py View File

@@ -245,15 +245,15 @@ def plugin_val(value):
245 245
         msg = "Expected a value in the form PLUGIN.TYPE but got : %s"
246 246
         raise SettingsValidationError(msg % value)
247 247
     value = tuple(spl)
248
-        #Late validation hook
249
-        @LodelHook('lodel2_dyncode_bootstraped')
250
-        def type_check(hookname, caller, payload):
251
-            from lodel import plugin
252
-            typesname = { cls.__name__.lower():cls for cls in plugin.PLUGINS_TYPE}
253
-            if value[1].lower() not in typesname:
254
-                msg = "Following plugin type do not exist in plugin list %s : %s"
255
-                raise SettingsValidationError(msg % value)
256
-            return value
248
+    #Late validation hook
249
+    @LodelHook('lodel2_dyncode_bootstraped')
250
+    def type_check(hookname, caller, payload):
251
+        from lodel import plugin
252
+        typesname = { cls.__name__.lower():cls for cls in plugin.PLUGINS_TYPE}
253
+        if value[1].lower() not in typesname:
254
+            msg = "Following plugin type do not exist in plugin list %s : %s"
255
+            raise SettingsValidationError(msg % value)
256
+        return value
257 257
     plug_type_val = plugin_val(value)
258 258
     return plug_type_val
259 259
 

Loading…
Cancel
Save