Skip to content

Commit

Permalink
Wrap jedi script usages access in try/except
Browse files Browse the repository at this point in the history
  • Loading branch information
pappasam committed Dec 4, 2019
1 parent b07e25f commit 05d2cee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jedi_language_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ def lsp_rename(
) -> Optional[WorkspaceEdit]:
"""Optional workspace edit"""
script = get_jedi_script(server, params)
definitions = script.usages()
try:
definitions = script.usages()
except Exception: # pylint: disable=broad-except
return None
locations = [
get_location_from_definition(definition) for definition in definitions
]
Expand Down

0 comments on commit 05d2cee

Please sign in to comment.