]> granicus.if.org Git - python/commitdiff
On second thought, first try for _winreg, and then winreg. Only if both
authorGreg Ward <gward@python.net>
Thu, 29 Jun 2000 23:04:59 +0000 (23:04 +0000)
committerGreg Ward <gward@python.net>
Thu, 29 Jun 2000 23:04:59 +0000 (23:04 +0000)
fail do we try for win32api/win32con.  If *those* both fail, then we don't
have registry access.  Phew!

Lib/distutils/msvccompiler.py

index 6acd4efd0d5aa0454e963c5d230a494dbf7903a7..ae5e2d767a6e8b512cc24dbca5d12010f91c509e 100644 (file)
@@ -20,7 +20,11 @@ from distutils.ccompiler import \
 
 _can_read_reg = 0
 try:
-    import _winreg
+    try:
+        import _winreg
+    except ImportError:
+        import winreg                   # for pre-2000/06/29 CVS Python
+
     _can_read_reg = 1
     hkey_mod = _winreg