summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2013-03-31 12:20:40 +0100
committerBob Halley <halley@dnspython.org>2013-03-31 12:20:40 +0100
commitfe3ee7ec3145bf5472601b0ceb11fc085aa14705 (patch)
tree478f4e50da683c5d65dc4bf863634f09ac2c172d
parent054c24c69db4e6344ba46f891e3392dcbb3bb7ec (diff)
downloaddnspython-fe3ee7ec3145bf5472601b0ceb11fc085aa14705.tar.gz
do not print empty rdatasets
-rw-r--r--dns/node.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/dns/node.py b/dns/node.py
index bfe8c07..630e32a 100644
--- a/dns/node.py
+++ b/dns/node.py
@@ -49,7 +49,8 @@ class Node(object):
s = io.StringIO()
for rds in self.rdatasets:
- print(rds.to_text(name, **kw), file=s)
+ if len(rds) > 0:
+ print(rds.to_text(name, **kw), file=s)
return s.getvalue()[:-1]
def __repr__(self):