1
0
forked from VimPlug/jedi

Fix a python3 issue with py__file__.

This commit is contained in:
Dave Halter
2016-12-03 13:41:55 +01:00
parent f355c04cae
commit 760f900560
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -85,7 +85,10 @@ class CompiledObject(Context):
return bool(self.obj)
def py__file__(self):
return self.obj.__file__
try:
return self.obj.__file__
except AttributeError:
return None
def is_class(self):
return inspect.isclass(self.obj)