mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
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 <j@w1.fi>
This commit is contained in:
parent
2a79a8ce14
commit
6395b9eb3e
@ -84,7 +84,7 @@ def add_log_file(conn, test, run, type, path):
|
|||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
return
|
return
|
||||||
contents = None
|
contents = None
|
||||||
with open(path, 'r') as f:
|
with open(path, 'rb') as f:
|
||||||
contents = f.read()
|
contents = f.read()
|
||||||
if contents is None:
|
if contents is None:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user