diff options
| author | Bob Halley <halley@nominum.com> | 2012-04-07 21:43:46 +0100 |
|---|---|---|
| committer | Bob Halley <halley@nominum.com> | 2012-04-07 21:43:46 +0100 |
| commit | 31cd57d2e97da4c1f2798fef760ce24fe905c6c8 (patch) | |
| tree | 82af25ce22461d166229a644ab309c61bd4a5013 | |
| parent | 232b6009dd5382caae6517511c16fa0bc757f112 (diff) | |
| download | dnspython-31cd57d2e97da4c1f2798fef760ce24fe905c6c8.tar.gz | |
raise ValueError if the argument to node.replace_rdataset() is not an rdataset
| -rw-r--r-- | dns/node.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dns/node.py b/dns/node.py index d8eb482..32f9c08 100644 --- a/dns/node.py +++ b/dns/node.py @@ -167,6 +167,8 @@ class Node(object): at the node, it stores I{replacement} itself. """ + if not isinstance(replacement, dns.rdataset.Rdataset): + raise ValueError, 'replacement is not an rdataset' self.delete_rdataset(replacement.rdclass, replacement.rdtype, replacement.covers) self.rdatasets.append(replacement) |
