in test_python_syntax fix check for Py3

This commit is contained in:
wmayer
2019-01-03 10:40:19 +01:00
parent 98ebeaa198
commit 8527b0228e

View File

@@ -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: