summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFloris Bruynooghe <flub@devork.be>2014-09-08 22:24:36 +0100
committerFloris Bruynooghe <flub@devork.be>2014-09-08 22:24:36 +0100
commit584fd45df00855b87308f4e4fc2d2e16efdbebb3 (patch)
tree584134fa3cb5853697c6ccd4d2181a8c373bc9cc
parent809e11e42c0526fc1893e940b68c8011cf368459 (diff)
downloadtox-584fd45df00855b87308f4e4fc2d2e16efdbebb3.tar.gz
Better error reporting for a bad interpreter
When an interpreter's binary exists but no valid version_info is extracted the error message right now simply says <2.5 is not supported which is not very helpful. This tries to improve the error reporting for this case.
-rw-r--r--tox/_config.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tox/_config.py b/tox/_config.py
index 26603c9..4882055 100644
--- a/tox/_config.py
+++ b/tox/_config.py
@@ -184,6 +184,9 @@ class VenvConfig:
info = self.config.interpreters.get_info(self.basepython)
if not info.executable:
raise tox.exception.InterpreterNotFound(self.basepython)
+ if not info.version_info:
+ raise tox.exception.InvocationError(
+ 'Failed to get version_info for %s: %s' % (info.name, info.err))
if info.version_info < (2,6):
raise tox.exception.UnsupportedInterpreter(
"python2.5 is not supported anymore, sorry")