From 6395b9eb3e55d414401dc44c605053ca1e77c249 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 2 Feb 2019 13:08:08 +0200 Subject: [PATCH] tests: Read binary file in add_log_file() for python3 python3 requires sqlite3.Binary() input to be bytes instead of str, so open the files for binary mode reading. Signed-off-by: Jouni Malinen --- tests/hwsim/run-tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py index be0edcb7a..49e42cd78 100755 --- a/tests/hwsim/run-tests.py +++ b/tests/hwsim/run-tests.py @@ -84,7 +84,7 @@ def add_log_file(conn, test, run, type, path): if not os.path.exists(path): return contents = None - with open(path, 'r') as f: + with open(path, 'rb') as f: contents = f.read() if contents is None: return