--- comix-4.0.4/mime/comicthumb.debug1 2008-11-10 07:17:46.000000000 +0900
+++ comix-4.0.4/mime/comicthumb 2010-03-18 17:54:12.000000000 +0900
@@ -196,6 +196,9 @@
extractor = Extractor(in_path)
files = extractor.get_files()
chosen = guess_cover(files)
+ # No files may be chosen
+ if not chosen:
+ sys.exit(1)
fd = extractor.extract(chosen)
im = Image.open(fd)
if im.size[0] > im.size[1]:
@@ -206,7 +209,14 @@
y = size
x = max(1, x)
y = max(1, y)
- im.thumbnail((x, y), Image.ANTIALIAS)
- im = im.convert('RGB')
- im.save(out_path, 'PNG')
+
+ # FIXME
+ # If some error occurs, simply ignore.
+ try:
+ im.thumbnail((x, y), Image.ANTIALIAS)
+ im = im.convert('RGB')
+ im.save(out_path, 'PNG')
+ except:
+ sys.exit(1)
+
sys.exit(0)