type shall not be a list
authorgwen <gremond@cadoles.com>
Wed, 27 Feb 2013 07:50:41 +0000 (08:50 +0100)
committergwen <gremond@cadoles.com>
Wed, 27 Feb 2013 07:50:41 +0000 (08:50 +0100)
tiramisu/value.py

index 2ac7add..cd256fc 100644 (file)
@@ -184,8 +184,7 @@ class Values(object):
                    raise MultiTypeError("invalid len for the slave: {0}"
                     " which has {1} as master".format(opt._name,
                                                       self.slaves[opt]._name))
                    raise MultiTypeError("invalid len for the slave: {0}"
                     " which has {1} as master".format(opt._name,
                                                       self.slaves[opt]._name))
-        elif opt.is_multi():
-            if not isinstance(value, Multi):
+        if opt.is_multi() and not isinstance(value, Multi):
                 value = Multi(value, self.context, opt, multitypes.default)
         self.setitem(opt, value)
 
                 value = Multi(value, self.context, opt, multitypes.default)
         self.setitem(opt, value)