From bb10dfc5055b6877f35a362ee7705c612aece418 Mon Sep 17 00:00:00 2001 From: Pedro Worcel Date: Mon, 31 Mar 2014 20:19:23 +1300 Subject: 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 --- netlib/odict.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'netlib') diff --git a/netlib/odict.py b/netlib/odict.py index d0ff5cf6..0640c25d 100644 --- a/netlib/odict.py +++ b/netlib/odict.py @@ -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]) -- cgit v1.2.3