]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Add some backwards compatibility to the winreg fix
authorBob Halley <halley@dnspython.org>
Sun, 7 Jul 2013 11:05:29 +0000 (12:05 +0100)
committerBob Halley <halley@dnspython.org>
Sun, 7 Jul 2013 11:05:29 +0000 (12:05 +0100)
dns/resolver.py

index 938ca939145a52fbc2233479cb8e7162df555ce8..df81fe70ca8eb5cfa09250ae421d86e778038dc9 100644 (file)
@@ -40,7 +40,10 @@ import dns.rdatatype
 import dns.reversename
 
 if sys.platform == 'win32':
-    import winreg as _winreg
+    try:
+        import winreg as _winreg
+    except ImportError:
+        import _winreg
 
 class NXDOMAIN(dns.exception.DNSException):
     """The query name does not exist."""