Python versions below 3.7 do not correctly read the AUTHORS.rst file unless
the LC_CTYPE environment variable is set to UTF-8. This causes unit test
number 24:checkpatch - AUTHORS.rst existence to fail with
UnicodeDecodeError

Signed-off-by: Ivan Burnin <iburnin@k2.cloud>
---
utilities/checkpatch.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index 28d0977eb..52bb8196b 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -841,7 +841,7 @@ def do_authors_exist(authors):
     missing_authors = []

     try:
-        with open(get_top_directory() + "/AUTHORS.rst", "r") as file:
+        with open(get_top_directory() + "/AUTHORS.rst", "r",  
encoding="utf-8") as file:
             file_content = file.read()
             for author in authors:
                 m = re.search(r'<(.*?)>', author)
--
2.49.0


_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to