8000 Merge pull request #1028 from diraol/fix_pkg_resources · python-mode/python-mode@08dbb8c · GitHub
[go: up one dir, main page]

Skip to content

Commit 08dbb8c

Browse files
authored
Merge pull request #1028 from diraol/fix_pkg_resources
Possibly fixing vim/python import machinery error
2 parents b36724a + 3d7bed2 commit 08dbb8c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pymode/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44

55
import sys
66
import vim # noqa
7-
7+
try:
8+
from importlib.machinery import PathFinder as _PathFinder
9+
if not hasattr(vim, 'find_module'):
10+
vim.find_module = _PathFinder.find_module
11+
except ImportError:
12+
pass
813

914
def auto():
1015
"""Fix PEP8 erorrs in current buffer.

0 commit comments

Comments
 (0)
0