fixed ModuleNotFound error

This commit is contained in:
David Halter
2012-09-12 23:19:53 +02:00
parent 0322aceeca
commit d0406b416d
2 changed files with 6 additions and 3 deletions

View File

@@ -244,7 +244,10 @@ def get_definition(source, line, column, source_path):
for s in scopes.copy():
if isinstance(s, imports.ImportPath):
scopes.remove(s)
scopes.update(resolve_import_paths(set(s.follow())))
try:
scopes.update(resolve_import_paths(set(s.follow())))
except imports.ModuleNotFound:
pass
return scopes
pos = (line, column)