Menu

#7 NT unable to resolve (DNS.DnsRequest err

open
Bug fixes (9)
5
2002-04-23
2002-03-13
No

The RegistryResolve() is returning (in my case) a
string:

u"13.175.212.75 13.175.212.76"

Which does not seem to be handled correctly, instead I
reformated it into a list, which seems to work fine.

if os.name=="nt":
from win32dns import RegistryResolve
junk = RegistryResolve()[0]
length_junk = len(string.split (junk, " "))
junk2 = []
for entry in string.split(junk, " "):
junk2.append (entry)
defaults['server'] = junk2
return

Discussion

  • Anthony Baxter

    Anthony Baxter - 2002-04-23
    • assigned_to: nobody --> anthonybaxter
     
  • Anthony Baxter

    Anthony Baxter - 2002-04-23

    Logged In: YES
    user_id=29957

    Hm. I've replaced the 'stringdisplay()' function
    in win32dns with the following:
    def stringdisplay(s):
    '''convert "d.d.d.d,d.d.d.d" to ["d.d.d.d","d.d.d.d"].
    also handle u'd.d.d.d d.d.d.d', as reporting on SF
    '''
    import re
    return map(str, re.split("[ ,]",s))

    I believe this should fix the problem.