aboutsummaryrefslogtreecommitdiffstats
path: root/netlib
diff options
context:
space:
mode:
authorPedro Worcel <pedro@worcel.com>2014-03-31 20:19:23 +1300
committerPedro Worcel <pedro@worcel.com>2014-03-31 20:19:23 +1300
commitbb10dfc5055b6877f35a362ee7705c612aece418 (patch)
tree9fd249a12e4c9094417b8c94d781513246add9b8 /netlib
parente7c3e4c5acdf9a229e13502e14a39caac332fe6c (diff)
downloadmitmproxy-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.py5
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])