fix exception because try to read a byte object

This commit is contained in:
un-pogaz 2025-09-29 14:06:14 +02:00
parent 5d01722cbb
commit 1ba1407c8b

View File

@ -34,7 +34,7 @@ class ISOData(Command):
with open(opts.path_to_isocodes, 'rb') as f: with open(opts.path_to_isocodes, 'rb') as f:
self._zip_data = f.read() self._zip_data = f.read()
# get top level directory # get top level directory
top = {item.split('/')[0] for item in zipfile.ZipFile(self.zip_data).namelist()} top = {item.split('/')[0] for item in zipfile.ZipFile(BytesIO(self.zip_data)).namelist()}
assert len(top) == 1 assert len(top) == 1
self.top_level_filename = top.pop() self.top_level_filename = top.pop()