changeset: 98542:a2016b29762c branch: 3.5 parent: 98540:ba956289fe66 user: Steve Dower date: Mon Oct 05 10:35:00 2015 -0700 files: Lib/distutils/_msvccompiler.py Misc/NEWS description: Issue #25316: distutils raises OSError instead of DistutilsPlatformError when MSVC is not installed. diff -r ba956289fe66 -r a2016b29762c Lib/distutils/_msvccompiler.py --- a/Lib/distutils/_msvccompiler.py Mon Oct 05 09:19:11 2015 -0700 +++ b/Lib/distutils/_msvccompiler.py Mon Oct 05 10:35:00 2015 -0700 @@ -28,15 +28,17 @@ from itertools import count def _find_vcvarsall(plat_spec): - with winreg.OpenKeyEx( - winreg.HKEY_LOCAL_MACHINE, - r"Software\Microsoft\VisualStudio\SxS\VC7", - access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY - ) as key: - if not key: - log.debug("Visual C++ is not registered") - return None, None + try: + key = winreg.OpenKeyEx( + winreg.HKEY_LOCAL_MACHINE, + r"Software\Microsoft\VisualStudio\SxS\VC7", + access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY + ) + except OSError: + log.debug("Visual C++ is not registered") + return None, None + with key: best_version = 0 best_dir = None for i in count(): diff -r ba956289fe66 -r a2016b29762c Misc/NEWS --- a/Misc/NEWS Mon Oct 05 09:19:11 2015 -0700 +++ b/Misc/NEWS Mon Oct 05 10:35:00 2015 -0700 @@ -34,6 +34,9 @@ Library ------- +- Issue #25316: distutils raises OSError instead of DistutilsPlatformError + when MSVC is not installed. + - Issue #23972: Updates asyncio datagram create method allowing reuseport and reuseaddr socket options to be set prior to binding the socket. Mirroring the existing asyncio create_server method the reuseaddr option