From: Greg Ward Date: Thu, 29 Jun 2000 23:04:59 +0000 (+0000) Subject: On second thought, first try for _winreg, and then winreg. Only if both X-Git-Tag: v2.0b1~1269 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83c3870e2b3c1a652bdcdd8779ab8fc0f284f27d;p=python On second thought, first try for _winreg, and then winreg. Only if both fail do we try for win32api/win32con. If *those* both fail, then we don't have registry access. Phew! --- diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py index 6acd4efd0d..ae5e2d767a 100644 --- a/Lib/distutils/msvccompiler.py +++ b/Lib/distutils/msvccompiler.py @@ -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