Updates as requested.

This commit is contained in:
MichaelFitzurka 2022-03-26 12:42:33 -04:00
parent 1540903121
commit bd1601ecf8

View File

@ -71,11 +71,11 @@ class SevenZipArchiver:
with py7zr.SevenZipFile(self.path, 'r') as zf: with py7zr.SevenZipFile(self.path, 'r') as zf:
data = zf.read(archive_file)[archive_file].read() data = zf.read(archive_file)[archive_file].read()
except py7zr.Bad7zFile as e: except py7zr.Bad7zFile as e:
print("bad zipfile [{0}]: {1} :: {2}".format(e, self.path, print("bad 7zip file [{0}]: {1} :: {2}".format(e, self.path,
archive_file), file=sys.stderr) archive_file), file=sys.stderr)
raise IOError raise IOError
except Exception as e: except Exception as e:
print("bad zipfile [{0}]: {1} :: {2}".format(e, self.path, print("bad 7zip file [{0}]: {1} :: {2}".format(e, self.path,
archive_file), file=sys.stderr) archive_file), file=sys.stderr)
raise IOError raise IOError
@ -1153,9 +1153,6 @@ class ComicArchive:
data = self.getPage(idx) data = self.getPage(idx)
if data is not None: if data is not None:
try: try:
if isinstance(data, bytes):
im = Image.open(io.BytesIO(data))
else:
im = Image.open(io.StringIO(data)) im = Image.open(io.StringIO(data))
w, h = im.size w, h = im.size