From 83c3870e2b3c1a652bdcdd8779ab8fc0f284f27d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 29 Jun 2000 23:04:59 +0000 Subject: 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! --- Lib/distutils/msvccompiler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py index 6acd4ef..ae5e2d7 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 -- cgit v0.12