Browse Source

Added a check in the options' check method, to see if the option name indicated corresponds to an existing option

Roland Haroutiounian 8 years ago
parent
commit
763e4a880d
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      lodel/leapi/datahandlers/base_classes.py

+ 4
- 1
lodel/leapi/datahandlers/base_classes.py View File

@@ -65,7 +65,10 @@ class DataHandler(object):
65 65
     def check_options(self):
66 66
         for option_name, option_value in self.options_values.items():
67 67
             # TODO Change the call to self.options_spec if the specifications are passed as tuple
68
-            self.options_values[option_name] = self.options_spec[option_name].check_value(option_value)
68
+            if option_name in self.options_spec:
69
+                self.options_values[option_name] = self.options_spec[option_name].check_value(option_value)
70
+            else:
71
+                pass  # TODO decide what kind of exception should be raised here
69 72
 
70 73
     @property
71 74
     def options(self):

Loading…
Cancel
Save