summaryrefslogtreecommitdiff
path: root/lib/dnspython/examples
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-08-27 16:07:52 +0200
committerJelmer Vernooij <jelmer@samba.org>2011-08-27 17:40:39 +0200
commit8bd71350abe48fdcfc0125e48fa97abdf31e1270 (patch)
tree2873d7fc77f9ec1992e24886a9feae80b48ffaef /lib/dnspython/examples
parentbd01a8e79faa3d657f01529c063cd0e09d711880 (diff)
downloadsamba-8bd71350abe48fdcfc0125e48fa97abdf31e1270.tar.gz
samba-8bd71350abe48fdcfc0125e48fa97abdf31e1270.tar.bz2
samba-8bd71350abe48fdcfc0125e48fa97abdf31e1270.zip
dnspython: Update to latest upstream snapshot.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Aug 27 17:40:39 CEST 2011 on sn-devel-104
Diffstat (limited to 'lib/dnspython/examples')
-rwxr-xr-xlib/dnspython/examples/xfr.py6
1 files changed, 5 insertions, 1 deletions
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: