Calling lazy.mxlookup(name) does not work out of the box.
Since the name of this module does more than just
imply laziness, it makes more sense that lazy should
initialize the DNS server.
This was a simple matter of adding a couple lines:
if Base.defaults['server'] == []:
Base.DiscoverNameServers()
This almost seems like a bug since it's undocumented
that defaults['server'] needs to be initialized before
you can use any calls to lazy. It's not clear how
lazy was intended to work, but one would presume that
you could just import lazy then do a call to mxlookup.
It looks like this project might have been abandoned, but
perhaps this will be useful to other users out there that
want to manually patch their pydns.
Logged In: YES
user_id=1300068
Originator: NO
A fix for this issue has been included in the latest python-dns update in Ubuntu Linux. See https://launchpad.net/ubuntu/+source/python-dns/2.3.0-5.1ubuntu2 for details.
Logged In: YES
user_id=1300068
Originator: NO
Fixed in 2.3.1