diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2012-03-13 17:01:26 -0700 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2012-03-13 17:01:26 -0700 |
commit | 2f063cdee0ed30a9cc3fbc1a678a0ba27a28ac6b (patch) | |
tree | 21a42f326de0088e2e0646a4971f6cea649c9621 /distutils2 | |
parent | e53fda893c8170d9744df07471802bc8f97e5eda (diff) | |
download | disutils2-2f063cdee0ed30a9cc3fbc1a678a0ba27a28ac6b.tar.gz |
Fix ImportError in test
Diffstat (limited to 'distutils2')
-rw-r--r-- | distutils2/tests/test_msvc9compiler.py | 5 |
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) |