diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-01-20 20:46:51 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-01-20 20:48:24 +0100 |
commit | 4f484625f9587d2f12a6e2f8ed9cac2fff467183 (patch) | |
tree | d81fc5536c18881622bd0d05581fd2adb272e159 | |
parent | 91782b27a9df8f7f615dbb8263a65c5caa18cf84 (diff) | |
download | ghdl-4f484625f9587d2f12a6e2f8ed9cac2fff467183.tar.gz ghdl-4f484625f9587d2f12a6e2f8ed9cac2fff467183.tar.bz2 ghdl-4f484625f9587d2f12a6e2f8ed9cac2fff467183.zip |
lsp.py: only use urllib (as python3 is required)
-rw-r--r-- | pyGHDL/lsp/lsp.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/pyGHDL/lsp/lsp.py b/pyGHDL/lsp/lsp.py index 79ab39ce8..1806db8d8 100644 --- a/pyGHDL/lsp/lsp.py +++ b/pyGHDL/lsp/lsp.py @@ -1,12 +1,7 @@ import os import logging import json - -try: - from urllib.parse import unquote, quote -except ImportError: - from urllib2 import quote - from urlparse import unquote +from urllib.parse import unquote, quote log = logging.getLogger("ghdl-ls") @@ -36,6 +31,8 @@ class LSPConn: def path_from_uri(uri): # Convert file uri to path (strip html like head part) + # This is needed to get the root path and to load a document when the + # textual source is not present. if not uri.startswith("file://"): # No scheme return uri |