2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-27 03:19:56 +00:00

Fix python3 for os import

Need to be explicit about binary data with python 3.
This commit is contained in:
Jarrod Johnson 2020-02-21 09:34:49 -05:00
parent 4b3541e21d
commit 90bec92d1f

View File

@ -98,10 +98,10 @@ def scan_iso(filename):
return filelist, filecontents
def fingerprint(filename):
with open(sys.argv[1]) as archive:
with open(sys.argv[1], 'rb') as archive:
header = archive.read(32768)
archive.seek(32769)
if archive.read(6) == 'CD001\x01':
if archive.read(6) == b'CD001\x01':
# ISO image
isoinfo = scan_iso(filename)
name = None