diff options
author | Greg Ward <gward@python.net> | 2000-06-29 23:04:59 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-06-29 23:04:59 (GMT) |
commit | 83c3870e2b3c1a652bdcdd8779ab8fc0f284f27d (patch) | |
tree | d5ad60b6f94854406f1ac66e5e50faeb539696d3 /Lib | |
parent | cc7371c437595b664efa53dd442fced33d25c34c (diff) | |
download | cpython-83c3870e2b3c1a652bdcdd8779ab8fc0f284f27d.zip cpython-83c3870e2b3c1a652bdcdd8779ab8fc0f284f27d.tar.gz cpython-83c3870e2b3c1a652bdcdd8779ab8fc0f284f27d.tar.bz2 |
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!
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/msvccompiler.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 |