summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Halley <halley@nominum.com>2009-06-17 15:10:59 +0100
committerBob Halley <halley@nominum.com>2009-06-17 15:10:59 +0100
commitcfa95cc113624b128655c3c71955f8f81560fee1 (patch)
tree9565afb0c2c97ac8a2bbd811d3cf719f71d82863
parent5d8708c31fdbd5a16d3b4d48c2a2f6d70eb36c82 (diff)
downloaddnspython-cfa95cc113624b128655c3c71955f8f81560fee1.tar.gz
Fix NSEC.to_text()
-rw-r--r--dns/rdtypes/ANY/NSEC.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/dns/rdtypes/ANY/NSEC.py b/dns/rdtypes/ANY/NSEC.py
index aac5dd3..7a5dd9d 100644
--- a/dns/rdtypes/ANY/NSEC.py
+++ b/dns/rdtypes/ANY/NSEC.py
@@ -37,6 +37,7 @@ class NSEC(dns.rdata.Rdata):
def to_text(self, origin=None, relativize=True, **kw):
next = self.next.choose_relativity(origin, relativize)
+ text = ''
for (window, bitmap) in self.windows:
bits = []
for i in xrange(0, len(bitmap)):
@@ -45,8 +46,8 @@ class NSEC(dns.rdata.Rdata):
if byte & (0x80 >> j):
bits.append(dns.rdatatype.to_text(window * 256 + \
i * 8 + j))
- text = ' '.join(bits)
- return '%s %s' % (next, text)
+ text += (' ' + ' '.join(bits))
+ return '%s%s' % (next, text)
def from_text(cls, rdclass, rdtype, tok, origin = None, relativize = True):
next = tok.get_name()