aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/odict.py
diff options
context:
space:
mode:
Diffstat (limited to 'netlib/odict.py')
-rw-r--r--netlib/odict.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/netlib/odict.py b/netlib/odict.py
index 46b74e8e..1e51bb3f 100644
--- a/netlib/odict.py
+++ b/netlib/odict.py
@@ -1,3 +1,4 @@
+from __future__ import (absolute_import, print_function, division)
import re, copy
@@ -23,6 +24,9 @@ class ODict:
def __eq__(self, other):
return self.lst == other.lst
+ def __ne__(self, other):
+ return not self.__eq__(other)
+
def __iter__(self):
return self.lst.__iter__()
@@ -60,7 +64,8 @@ class ODict:
key, they are cleared.
"""
if isinstance(valuelist, basestring):
- raise ValueError("ODict valuelist should be lists.")
+ raise ValueError("Expected list of values instead of string. Example: odict['Host'] = ['www.example.com']")
+
new = self._filter_lst(k, self.lst)
for i in valuelist:
new.append([k, i])