Greetings,

In Update.present() where it handles Rdata argument, it synthesizes a
zero TTL into the beginning of args before passing args to _add(), only
if len(args) > 1.  Therefore, TTL is not inserted into args that
contains only one Rdata instance, which breaks when _add() tries to
extract args[0] as TTL.  Update.present() can handle Rdata arguments if
more than one are specified, because it passes the len(args) > 1 check.

The fix is to replace in Update.present() (right before the "Add a 0
TTL" comment):

            if len(args) > 1:

with:

            if not isinstance(args[0], dns.rdata.Rdataset):

in order to match _add()'s expectation (which is to extract TTL if
args[0] is not an Rdataset).

Regards,
Eugene

_______________________________________________
dnspython-bugs mailing list
[email protected]
http://howl.play-bow.org/mailman/listinfo.cgi/dnspython-bugs

Reply via email to