do not print empty rdatasets
authorBob Halley <halley@dnspython.org>
Sun, 31 Mar 2013 11:18:54 +0000 (12:18 +0100)
committerBob Halley <halley@dnspython.org>
Sun, 31 Mar 2013 11:18:54 +0000 (12:18 +0100)
dns/node.py

index f480610a6b69b9c86819bd085d1c14ba519ece75..e74004f6d06397907b14e72917e0d5a0ff72da2c 100644 (file)
@@ -49,7 +49,8 @@ class Node(object):
 
         s = StringIO.StringIO()
         for rds in self.rdatasets:
-            print >> s, rds.to_text(name, **kw)
+            if len(rds) > 0:
+                print >> s, rds.to_text(name, **kw)
         return s.getvalue()[:-1]
 
     def __repr__(self):