Instead of removing the error, for consistency, leaving the error as-was

and replaced the message with something that may or may not be more
understandable :P
This commit is contained in:
Pedro Worcel 2014-03-31 20:19:23 +13:00
parent e7c3e4c5ac
commit bb10dfc505

View File

@ -60,9 +60,8 @@ class ODict:
key, they are cleared.
"""
if isinstance(valuelist, basestring):
# convert the string into a single element list.
valuelist = [valuelist]
raise ValueError("Expected list instead of string. E.g. odict['elem'] = ['string1', 'string2']")
new = self._filter_lst(k, self.lst)
for i in valuelist:
new.append([k, i])