1
0
forked from VimPlug/jedi

Fix some more py36 to py27 issues

This commit is contained in:
Dave Halter
2017-12-28 01:33:51 +01:00
parent a8d3c46e9d
commit a7dea9e821
3 changed files with 16 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
import os
import imp
from jedi._compatibility import unicode
from jedi._compatibility import unicode, force_unicode
from jedi.evaluate.cache import evaluator_method_cache
from jedi.evaluate.base_context import ContextualizedNode
from jedi.evaluate.helpers import is_string
@@ -11,16 +11,17 @@ from jedi.evaluate.utils import ignored
def _abs_path(module_context, path):
module_path = module_context.py__file__()
if os.path.isabs(path):
return path
module_path = module_context.py__file__()
if module_path is None:
# In this case we have no idea where we actually are in the file
# system.
return None
base_dir = os.path.dirname(module_path)
path = force_unicode(path)
return os.path.abspath(os.path.join(base_dir, path))