Skip to content

Commit 22a746e

Browse files
authored
catch a TypeError from os.path.samefile (#31)
in case document.path or d.module_path are None
1 parent 5a13db1 commit 22a746e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: pylsp/plugins/symbols.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def pylsp_document_symbols(config, document):
4040
continue
4141
try:
4242
docismodule = os.path.samefile(document.path, d.module_path)
43-
except AttributeError:
43+
except TypeError:
4444
# Python 2 on Windows has no .samefile, but then these are
4545
# strings for sure
4646
docismodule = document.path == d.module_path

0 commit comments

Comments
 (0)