[pypy-svn] r63280 - pypy/trunk/pypy/translator/platform
afa at codespeak.net
afa at codespeak.net
Tue Mar 24 15:41:10 CET 2009
Author: afa
Date: Tue Mar 24 15:41:08 2009
New Revision: 63280
Modified:
pypy/trunk/pypy/translator/platform/windows.py
Log:
Don't crash if the version of the msvc compiler cannot be determined
Modified: pypy/trunk/pypy/translator/platform/windows.py
==============================================================================
--- pypy/trunk/pypy/translator/platform/windows.py (original)
+++ pypy/trunk/pypy/translator/platform/windows.py Tue Mar 24 15:41:08 2009
@@ -88,7 +88,11 @@
returncode, stdout, stderr = _run_subprocess(self.cc, '',
env=self.c_environ)
r = re.search('Version ([0-9]+)\.([0-9]+)', stderr)
- self.version = int(''.join(r.groups())) / 10 - 60
+ if r is not None:
+ self.version = int(''.join(r.groups())) / 10 - 60
+ else:
+ # Probably not a msvc compiler...
+ self.version = 0
# Install debug options only when interpreter is in debug mode
if sys.executable.lower().endswith('_d.exe'):
More information about the Pypy-commit
mailing list