Skip to content

Commit fc84fa8

Browse files
committed
import from old imp library on older python versions
1 parent 4a687ea commit fc84fa8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: src/past/builtins/misc.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,13 @@ def oct(number):
103103
return '0' + builtins.oct(number)[2:]
104104

105105
raw_input = input
106-
from importlib import reload
106+
107+
try:
108+
from importlib import reload
109+
except ImportError:
110+
# for python2, python3 <= 3.4
111+
from imp import reload
112+
107113
unicode = str
108114
unichr = chr
109115
xrange = range

0 commit comments

Comments
 (0)