[Test] remove unnecessary Python check

we only support Python 3
This commit is contained in:
Uwe
2022-07-31 05:28:47 +02:00
parent f4636e826e
commit fb5c731847

View File

@@ -21,8 +21,6 @@
#* *
#***************************************************************************/
import sys
import os
import ast
import unittest
@@ -35,8 +33,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:
kargs["encoding"] = "utf-8"
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:
try: