using a TSIG keyring in my code (borrowed from examples/ddns.py)
resulted in this error:
2010-03-10 13:09:15,353 - root - WARNING - Unexpected error executing
script script_01_dns_update.py:<type 'exceptions.TypeError'>,
unsupported operand type(s) for &: 'str' and 'long', <traceback object
at 0x1e1d9e0>... skipped.
Traceback (most recent call last):
File "/tmp/script_01_dns_update.py", line 60, in <module>
response = dns.query.udp(update, '79.125.21.18', timeout=10)
File "/mydir/py/lib/dnspython/dns/query.py", line 113, in udp
wire = q.to_wire()
File "/mydir/py/lib/dnspython/dns/update.py", line 241, in to_wire
return super(Update, self).to_wire(origin, max_size)
File "/mydir/py/lib/dnspython/dns/message.py", line 418, in to_wire
self.keyalgorithm)
File "/mydir/py/lib/dnspython/dns/renderer.py", line 286, in add_tsig
algorithm=algorithm)
File "/mydir/py/lib/dnspython/dns/tsig.py", line 88, in sign
time_mac = struct.pack('!HIH', upper_time, lower_time, fudge)
investigating the problem, I've found that line 59 in module update.py
calls 'use_tsig' in this way:
self.use_tsig(keyring, keyname, keyalgorithm)
but 3th parameter in 'use_tsig' function is 'fudge': this way fudge
becomes a string and this generate the error.
I changed line 59 in update.py this way:
self.use_tsig(keyring=keyring, keyname=keyname, algorithm=keyalgorithm)
and everything worked correctly!
_______________________________________________
dnspython-bugs mailing list
[email protected]
http://howl.play-bow.org/mailman/listinfo.cgi/dnspython-bugs