rthalley/dnspython — Issue #3: dns/node.py TypeError in to_text
Author: yegle
Created: 2011-10-18 09:06:54+00:00
State: open

zone.example file:
@ IN SOA dns.example.com. admin.example.com. (
2010042671 ; serial
3600 ; refresh
1200 ; retry
86400 ; expire
360 ; minimum
)
@ NS dns
test A 127.0.0.1

test.py

```python
#!/usr/bin/python

import dns.zone, dns.name, dns.rdtypes

z = dns.zone.from_file('zone.example','example.com')
name = dns.name.from_text('test.example.com')
a = dns.rdtypes.IN.A.A(dns.rdataclass.IN, dns.rdatatype.A, '127.0.0.2')
z.replace_rdataset(name, a)
z.to_file('zone.output')
```

output:

Traceback (most recent call last):
File "./test.py", line 9, in
z.to_file('zone.output')
File "/usr/lib64/python2.7/site-packages/dns/zone.py", line 496, in to_file
relativize=relativize)
File "/usr/lib64/python2.7/site-packages/dns/node.py", line 52, in to_text
print >> s, rds.to_text(name, **kw)
TypeError: to_text() got multiple values for keyword argument 'origin'