##// END OF EJS Templates
py3: make check-py3-compat.py import importlib only if necessary...
Yuya Nishihara -
r30117:b85fa6bf default
parent child Browse files
Show More
@@ -10,7 +10,6 b''
10 from __future__ import absolute_import, print_function
10 from __future__ import absolute_import, print_function
11
11
12 import ast
12 import ast
13 import importlib
14 import os
13 import os
15 import sys
14 import sys
16 import traceback
15 import traceback
@@ -41,6 +40,7 b' def check_compat_py2(f):'
41
40
42 def check_compat_py3(f):
41 def check_compat_py3(f):
43 """Check Python 3 compatibility of a file with Python 3."""
42 """Check Python 3 compatibility of a file with Python 3."""
43 import importlib # not available on Python 2.6
44 with open(f, 'rb') as fh:
44 with open(f, 'rb') as fh:
45 content = fh.read()
45 content = fh.read()
46
46
General Comments 0
You need to be logged in to leave comments. Login now