From: Bob Halley Date: Sun, 31 Mar 2013 11:18:54 +0000 (+0100) Subject: do not print empty rdatasets X-Git-Tag: v1.11.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a458f6588ece114208aeabc471e8ee04993ccd2f;p=thirdparty%2Fdnspython.git do not print empty rdatasets --- diff --git a/dns/node.py b/dns/node.py index f480610a..e74004f6 100644 --- a/dns/node.py +++ b/dns/node.py @@ -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):