summaryrefslogtreecommitdiff
path: root/lib/dnspython/dns/rdata.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dnspython/dns/rdata.py')
-rw-r--r--lib/dnspython/dns/rdata.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/dnspython/dns/rdata.py b/lib/dnspython/dns/rdata.py
index ce0268697b..399677e984 100644
--- a/lib/dnspython/dns/rdata.py
+++ b/lib/dnspython/dns/rdata.py
@@ -28,6 +28,7 @@ chunk of hexstring that _hexify() produces before whitespace occurs.
import cStringIO
import dns.exception
+import dns.name
import dns.rdataclass
import dns.rdatatype
import dns.tokenizer
@@ -252,6 +253,9 @@ class Rdata(object):
return NotImplemented
return self._cmp(other) > 0
+ def __hash__(self):
+ return hash(self.to_digestable(dns.name.root))
+
def from_text(cls, rdclass, rdtype, tok, origin = None, relativize = True):
"""Build an rdata object from text format.