mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Environment._get_version: add msgs with exceptions
This commit is contained in:
committed by
Dave Halter
parent
a95274d66f
commit
b94b45cfa1
@@ -77,9 +77,12 @@ class Environment(_BaseEnvironment):
|
|||||||
stdout, stderr = process.communicate()
|
stdout, stderr = process.communicate()
|
||||||
retcode = process.poll()
|
retcode = process.poll()
|
||||||
if retcode:
|
if retcode:
|
||||||
raise InvalidPythonEnvironment()
|
raise InvalidPythonEnvironment(
|
||||||
except OSError:
|
"Exited with %d (stdout=%r, stderr=%r)" % (
|
||||||
raise InvalidPythonEnvironment()
|
retcode, stdout, stderr))
|
||||||
|
except OSError as exc:
|
||||||
|
raise InvalidPythonEnvironment(
|
||||||
|
"Could not get version information: %r" % exc)
|
||||||
|
|
||||||
# Until Python 3.4 wthe version string is part of stderr, after that
|
# Until Python 3.4 wthe version string is part of stderr, after that
|
||||||
# stdout.
|
# stdout.
|
||||||
|
|||||||
Reference in New Issue
Block a user