~ubuntu-branches/ubuntu/gutsy/python-dns/gutsy-security

« back to all changes in this revision

Viewing changes to debian/patches/04lazy-init.patch

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2007-05-22 20:59:24 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070522205924-9k8o81y1os1h2mhh
Tags: 2.3.1-1
* New upstream release
* Add debian/watch
* Remove debian/patches and all patches (incorporated upstream)
* Remove debian/rules entry for patch system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -Nur python-dns-2.3.0/DNS/lazy.py python-dns-2.3.0.new/DNS/lazy.py
2
 
--- python-dns-2.3.0/DNS/lazy.py        2002-05-06 02:14:38.000000000 -0400
3
 
+++ python-dns-2.3.0.new/DNS/lazy.py    2007-05-11 17:04:10.000000000 -0400
4
 
@@ -12,6 +12,7 @@
5
 
 
6
 
 def revlookup(name):
7
 
     "convenience routine for doing a reverse lookup of an address"
8
 
+    if Base.defaults['server'] == []: Base.DiscoverNameServers()
9
 
     a = string.split(name, '.')
10
 
     a.reverse()
11
 
     b = string.join(a, '.')+'.in-addr.arpa'
12
 
@@ -23,6 +24,7 @@
13
 
     convenience routine for doing an MX lookup of a name. returns a
14
 
     sorted list of (preference, mail exchanger) records
15
 
     """
16
 
+    if Base.defaults['server'] == []: Base.DiscoverNameServers()
17
 
     a = Base.DnsRequest(name, qtype = 'mx').req().answers
18
 
     l = map(lambda x:x['data'], a)
19
 
     l.sort()