refactor validation
[tiramisu.git] / tiramisu / option / optiondescription.py
index d719137..37171d2 100644 (file)
@@ -139,7 +139,7 @@ class OptionDescription(BaseOption, StorageOptionDescription):
                 option.impl_validate_options(cache_option)
         if init:
             if len(cache_option) != len(set(cache_option)):
-                for idx in xrange(1, len(cache_option)+1):
+                for idx in xrange(1, len(cache_option) + 1):
                     opt = cache_option.pop(0)
                     if opt in cache_option:
                         raise ConflictError(_('duplicate option: {0}').format(opt))
@@ -255,7 +255,7 @@ class OptionDescription(BaseOption, StorageOptionDescription):
 
     def _impl_get_suffixes(self, context):
         callback, callback_params = self.impl_get_callback()
-        values = carry_out_calculation(self, config=context,
+        values = carry_out_calculation(self, context=context,
                                        callback=callback,
                                        callback_params=callback_params)
         if len(values) > len(set(values)):