]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
try winreg on Windows [issue #160]
authorBob Halley <halley@dnspython.org>
Tue, 17 May 2016 14:25:15 +0000 (07:25 -0700)
committerBob Halley <halley@dnspython.org>
Tue, 17 May 2016 14:25:22 +0000 (07:25 -0700)
dns/resolver.py

index 924144400484ad02896a923c57767e97e9c97a8f..bccb430d649d8a6f72d8198a1f3bb984f7a07e21 100644 (file)
@@ -43,8 +43,10 @@ import dns.tsig
 from ._compat import xrange, string_types
 
 if sys.platform == 'win32':
-    import _winreg
-
+    try:
+        import winreg as _winreg
+    except ImportError:
+        import _winreg
 
 class NXDOMAIN(dns.exception.DNSException):