mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-09-29 15:31:08 -04:00
fix exception because try to read a byte object
This commit is contained in:
parent
5d01722cbb
commit
1ba1407c8b
@ -34,7 +34,7 @@ class ISOData(Command):
|
||||
with open(opts.path_to_isocodes, 'rb') as f:
|
||||
self._zip_data = f.read()
|
||||
# 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
|
||||
self.top_level_filename = top.pop()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user