in test_python_syntax fix check for Py3
This commit is contained in:
@@ -11,7 +11,7 @@ def test_python_syntax(rootdir, whitelist=None):
|
||||
for sub_dir, dirs, files in os.walk(rootdir):
|
||||
for fn in files:
|
||||
kargs = {}
|
||||
if sys.version_info.major > 3:
|
||||
if sys.version_info.major >= 3:
|
||||
kargs["encoding"] = "utf-8"
|
||||
if (not fn in whitelist) and os.path.splitext(fn)[1] == '.py':
|
||||
with open(os.path.join(sub_dir, fn), **kargs) as py_file:
|
||||
|
||||
Reference in New Issue
Block a user