I am on Win XP Pro, and have the same problem. I looked into the win32dns.py source code and found that it looks into the windows registry for the "NameServer" key. However, in my case the value for NameServer is empty. However, I do have an entry under DhcpNameServer, so I added 6 lines of code to win32dns.py to check both NameServer and DhcpNameServer for values.
I will try to attach the updated win32dns.py file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok I can't seem to attach the file so you will have to manually edit win32dns.py.
look for this chunk of code:
try:
nameserver,dummytype=_winreg.QueryValueEx(z,'NameServer')
if nameserver and not (nameserver in nameservers):
nameservers.extend(stringdisplay(nameserver))
except EnvironmentError:
pass
(starts around line 94)
....immediately after that "try/except" block, paste this code...
try:
nameserver,dummytype=_winreg.QueryValueEx(z,'DhcpNameServer')
if nameserver and not (nameserver in nameservers):
nameservers.extend(stringdisplay(nameserver))
except EnvironmentError:
pass
see the only difference is that now instead of only checking for "NameServer" it will check for "DhcpNameServer" as well.
hope that helps someone :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1258995
Originator: NO
I am on Win XP Pro, and have the same problem. I looked into the win32dns.py source code and found that it looks into the windows registry for the "NameServer" key. However, in my case the value for NameServer is empty. However, I do have an entry under DhcpNameServer, so I added 6 lines of code to win32dns.py to check both NameServer and DhcpNameServer for values.
I will try to attach the updated win32dns.py file.
Logged In: YES
user_id=1258995
Originator: NO
Ok I can't seem to attach the file so you will have to manually edit win32dns.py.
look for this chunk of code:
try:
nameserver,dummytype=_winreg.QueryValueEx(z,'NameServer')
if nameserver and not (nameserver in nameservers):
nameservers.extend(stringdisplay(nameserver))
except EnvironmentError:
pass
(starts around line 94)
....immediately after that "try/except" block, paste this code...
try:
nameserver,dummytype=_winreg.QueryValueEx(z,'DhcpNameServer')
if nameserver and not (nameserver in nameservers):
nameservers.extend(stringdisplay(nameserver))
except EnvironmentError:
pass
see the only difference is that now instead of only checking for "NameServer" it will check for "DhcpNameServer" as well.
hope that helps someone :)
Logged In: YES
user_id=1300068
Originator: NO
Bug #863364 in the patches section has a different approach to fixing this same problem.
Logged In: YES
user_id=1300068
Originator: NO
A fix for this issue has been included in the latest python-dns update in Ubuntu Linux. See https://launchpad.net/ubuntu/+source/python-dns/2.3.0-5.1ubuntu2 for details.
Logged In: YES
user_id=1300068
Originator: NO
Fixed in 2.3.1