diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-12-09 14:53:45 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-12-10 03:04:06 +0100 |
commit | 75ef8f1dd27f4985b3d705e7681a9218ad513c84 (patch) | |
tree | c28f415ff0e15bc40aa07f191afe0238d45ae598 /lib/dnspython/dns/node.py | |
parent | 91438920b465ec7455dd1cd700bbe8ec5050b3f9 (diff) | |
download | samba-75ef8f1dd27f4985b3d705e7681a9218ad513c84.tar.gz samba-75ef8f1dd27f4985b3d705e7681a9218ad513c84.tar.bz2 samba-75ef8f1dd27f4985b3d705e7681a9218ad513c84.zip |
dnspython: Update to newer upstream snapshot.
Diffstat (limited to 'lib/dnspython/dns/node.py')
-rw-r--r-- | lib/dnspython/dns/node.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/dnspython/dns/node.py b/lib/dnspython/dns/node.py index 07fff9293c..785a245464 100644 --- a/lib/dnspython/dns/node.py +++ b/lib/dnspython/dns/node.py @@ -23,18 +23,18 @@ import dns.renderer class Node(object): """A DNS node. - + A node is a set of rdatasets @ivar rdatasets: the node's rdatasets @type rdatasets: list of dns.rdataset.Rdataset objects""" __slots__ = ['rdatasets'] - + def __init__(self): """Initialize a DNS node. """ - + self.rdatasets = []; def to_text(self, name, **kw): @@ -46,7 +46,7 @@ class Node(object): @type name: dns.name.Name object @rtype: string """ - + s = StringIO.StringIO() for rds in self.rdatasets: print >> s, rds.to_text(name, **kw) @@ -54,7 +54,7 @@ class Node(object): def __repr__(self): return '<DNS node ' + str(id(self)) + '>' - + def __eq__(self, other): """Two nodes are equal if they have the same rdatasets. @@ -73,7 +73,7 @@ class Node(object): def __ne__(self, other): return not self.__eq__(other) - + def __len__(self): return len(self.rdatasets) @@ -159,7 +159,7 @@ class Node(object): def replace_rdataset(self, replacement): """Replace an rdataset. - + It is not an error if there is no rdataset matching I{replacement}. Ownership of the I{replacement} object is transferred to the node; |