Improved VS reg key error

This commit is contained in:
Nick Bolton 2010-06-16 19:36:17 +00:00
parent 4bb716e5b8
commit 32854a4cbd
1 changed files with 5 additions and 1 deletions

View File

@ -533,7 +533,11 @@ class InternalCommands:
else: else:
key_name = r'SOFTWARE\Microsoft\VisualStudio\SxS\VC7' key_name = r'SOFTWARE\Microsoft\VisualStudio\SxS\VC7'
try:
key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, key_name) key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, key_name)
except:
raise Exception('Unable to open Visual Studio registry key. Application may not be installed.')
if generator.startswith('Visual Studio 8'): if generator.startswith('Visual Studio 8'):
value,type = _winreg.QueryValueEx(key, '8.0') value,type = _winreg.QueryValueEx(key, '8.0')
elif generator.startswith('Visual Studio 9'): elif generator.startswith('Visual Studio 9'):