mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-25 01:38:36 +08:00
Raise a nicer exception instance instead of raising an exception class
This commit is contained in:
@@ -29,7 +29,7 @@ def find_module_py33(string, path=None):
|
|||||||
loader = importlib.find_loader(string)
|
loader = importlib.find_loader(string)
|
||||||
|
|
||||||
if loader is None:
|
if loader is None:
|
||||||
raise ImportError
|
raise ImportError("Couldn't find a loader for {0}".format(string))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if (loader.is_package(string)):
|
if (loader.is_package(string)):
|
||||||
|
|||||||
Reference in New Issue
Block a user