From 8bd71350abe48fdcfc0125e48fa97abdf31e1270 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 27 Aug 2011 16:07:52 +0200 Subject: dnspython: Update to latest upstream snapshot. Autobuild-User: Jelmer Vernooij Autobuild-Date: Sat Aug 27 17:40:39 CEST 2011 on sn-devel-104 --- lib/dnspython/examples/xfr.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/dnspython/examples/xfr.py') diff --git a/lib/dnspython/examples/xfr.py b/lib/dnspython/examples/xfr.py index 5cd6f55c06..e67ab18927 100755 --- a/lib/dnspython/examples/xfr.py +++ b/lib/dnspython/examples/xfr.py @@ -1,9 +1,13 @@ #!/usr/bin/env python import dns.query +import dns.resolver import dns.zone -z = dns.zone.from_xfr(dns.query.xfr('204.152.189.147', 'dnspython.org')) +soa_answer = dns.resolver.query('dnspython.org', 'SOA') +master_answer = dns.resolver.query(soa_answer[0].mname, 'A') + +z = dns.zone.from_xfr(dns.query.xfr(master_answer[0].address, 'dnspython.org')) names = z.nodes.keys() names.sort() for n in names: -- cgit