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

« back to all changes in this revision

Viewing changes to DNS/lazy.py

  • Committer: Bazaar Package Importer
  • Author(s): Joerg Wendland
  • Date: 2003-08-20 14:25:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20030820142529-3facqpkoslard81q
Tags: 2.3.0-5
* debian/control:
  Use ${python:Depends} for Depends, so that correct Depends are
  generated by dh_python. (closes: Bug#205884)
* debian/python-dns.postinst
  debian/python-dns.prerm:
  Remove these files and let debhelper handle these issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: lazy.py,v 1.4 2002/03/19 12:41:33 anthonybaxter Exp $
 
1
# $Id: lazy.py,v 1.5 2002/05/06 06:14:38 anthonybaxter Exp $
2
2
#
3
3
# This file is part of the pydns project.
4
4
# Homepage: http://pydns.sourceforge.net
8
8
 
9
9
# routines for lazy people.
10
10
import Base
 
11
import string
11
12
 
12
13
def revlookup(name):
13
14
    "convenience routine for doing a reverse lookup of an address"
14
 
    import string
15
15
    a = string.split(name, '.')
16
16
    a.reverse()
17
17
    b = string.join(a, '.')+'.in-addr.arpa'
23
23
    convenience routine for doing an MX lookup of a name. returns a
24
24
    sorted list of (preference, mail exchanger) records
25
25
    """
26
 
 
27
26
    a = Base.DnsRequest(name, qtype = 'mx').req().answers
28
27
    l = map(lambda x:x['data'], a)
29
28
    l.sort()
31
30
 
32
31
#
33
32
# $Log: lazy.py,v $
 
33
# Revision 1.5  2002/05/06 06:14:38  anthonybaxter
 
34
# reformat, move import to top of file.
 
35
#
34
36
# Revision 1.4  2002/03/19 12:41:33  anthonybaxter
35
37
# tabnannied and reindented everything. 4 space indent, no tabs.
36
38
# yay.