Skip to content

Commit 85a15fa

Browse files
committed
work with both py2 and 3
1 parent dba66a1 commit 85a15fa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ohmyvim/scripts.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from os.path import isfile
44
from os.path import basename
55
from ConfigObject import ConfigObject
6-
from urllib.request import urlopen
76
from subprocess import Popen
87
from subprocess import PIPE
98
from glob import glob
@@ -14,6 +13,11 @@
1413
import sys
1514
import os
1615

16+
try:
17+
from urllib import urlopen
18+
except ImportError:
19+
from urllib.request import urlopen
20+
1721
VIMRC = '''
1822
" Added by oh-my-vim
1923

0 commit comments

Comments
 (0)