summaryrefslogtreecommitdiff
path: root/distutils2/tests/test_msvc9compiler.py
diff options
context:
space:
mode:
Diffstat (limited to 'distutils2/tests/test_msvc9compiler.py')
-rw-r--r--distutils2/tests/test_msvc9compiler.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/distutils2/tests/test_msvc9compiler.py b/distutils2/tests/test_msvc9compiler.py
index 22e5cea..e7f3287 100644
--- a/distutils2/tests/test_msvc9compiler.py
+++ b/distutils2/tests/test_msvc9compiler.py
@@ -101,7 +101,10 @@ class msvc9compilerTestCase(support.TempdirManager,
v = Reg.get_value(path, 'dragfullwindows')
self.assertIn(v, ('0', '1', '2'))
- import winreg
+ try:
+ import winreg
+ except ImportError:
+ import _winreg as winreg
HKCU = winreg.HKEY_CURRENT_USER
keys = Reg.read_keys(HKCU, 'xxxx')
self.assertEqual(keys, None)