From: Jouni Malinen Date: Sat, 2 Feb 2019 11:08:08 +0000 (+0200) Subject: tests: Read binary file in add_log_file() for python3 X-Git-Tag: hostap_2_8~471 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6395b9eb3e55d414401dc44c605053ca1e77c249;p=thirdparty%2Fhostap.git 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 --- 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