find_module_py33: use str(e) with ValueError

ValueError has no message attribute.

Fixes https://github.com/davidhalter/jedi/issues/584
This commit is contained in:
Daniel Hahler
2015-05-09 23:05:30 +02:00
parent 2221f12de9
commit 4469e654ae

View File

@@ -25,7 +25,7 @@ def find_module_py33(string, path=None):
except ValueError as e:
# See #491. Importlib might raise a ValueError, to avoid this, we
# just raise an ImportError to fix the issue.
raise ImportError("Originally ValueError: " + e.message)
raise ImportError("Originally ValueError: " + str(e))
if loader is None:
raise ImportError("Couldn't find a loader for {0}".format(string))