diff options
author | Pedro Worcel <pedro@worcel.com> | 2014-03-31 20:19:23 +1300 |
---|---|---|
committer | Pedro Worcel <pedro@worcel.com> | 2014-03-31 20:19:23 +1300 |
commit | bb10dfc5055b6877f35a362ee7705c612aece418 (patch) | |
tree | 9fd249a12e4c9094417b8c94d781513246add9b8 /netlib | |
parent | e7c3e4c5acdf9a229e13502e14a39caac332fe6c (diff) | |
download | mitmproxy-bb10dfc5055b6877f35a362ee7705c612aece418.tar.gz mitmproxy-bb10dfc5055b6877f35a362ee7705c612aece418.tar.bz2 mitmproxy-bb10dfc5055b6877f35a362ee7705c612aece418.zip |
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
Diffstat (limited to 'netlib')
-rw-r--r-- | netlib/odict.py | 5 |
1 files changed, 2 insertions, 3 deletions
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]) |