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

« back to all changes in this revision

Viewing changes to DNS/win32dns.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
1
"""
2
 
 $Id: win32dns.py,v 1.2 2002/03/19 12:41:33 anthonybaxter Exp $
 
2
 $Id: win32dns.py,v 1.3 2002/05/06 06:15:31 anthonybaxter Exp $
3
3
 
4
4
 Extract a list of TCP/IP name servers from the registry 0.1
5
5
    0.1 Strobl 2001-07-19
19
19
          License analog to the current Python license
20
20
"""
21
21
 
22
 
import string
 
22
import string, re
23
23
import _winreg
24
24
 
25
25
def binipdisplay(s):
37
37
    return ol
38
38
 
39
39
def stringdisplay(s):
40
 
    'convert "d.d.d.d,d.d.d.d" to ["d.d.d.d","d.d.d.d"]'
41
 
    return string.split(s,",")
 
40
    '''convert "d.d.d.d,d.d.d.d" to ["d.d.d.d","d.d.d.d"].
 
41
       also handle u'd.d.d.d d.d.d.d', as reporting on SF 
 
42
    '''
 
43
    import re
 
44
    return map(str, re.split("[ ,]",s))
42
45
 
43
46
def RegistryResolve():
44
47
    nameservers=[]
110
113
 
111
114
#
112
115
# $Log: win32dns.py,v $
 
116
# Revision 1.3  2002/05/06 06:15:31  anthonybaxter
 
117
# apparently some versions of windows return servers as unicode
 
118
# string with space sep, rather than strings with comma sep.
 
119
# *sigh*
 
120
#
113
121
# Revision 1.2  2002/03/19 12:41:33  anthonybaxter
114
122
# tabnannied and reindented everything. 4 space indent, no tabs.
115
123
# yay.