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