Windows specific bug in formencode 0.7.1, concerning the Email Validator
"Jean-Sébastien Légaré" <[email protected]>
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
I`m submitting a bug that occurs in version 0.7.1 of formencode, on Windows, in the Email validator. The problem is in the file formencode/validators.py (version 0.7.1) just after the DNS library is imported (line 45). It calls DNS.ParseResolvConf() (located in DNS/Base.py), which is a unix specific call to load the name servers. Under windows, that fails with "Cannot find /etc/resolv.conf". Changing that line to DNS.DiscoverNameServers(), which works for both Unix and Windows, does the trick. (DiscoverNameServers() calls ParseResolvConf() if sys.platform is neither "win32" nor "nt"). Thanks ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/