Ignore double errors from pixbuf-loader closing.
authorFredrik Tolf <fredrik@dolda2000.com>
Sun, 15 Nov 2015 04:56:47 +0000 (05:56 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Sun, 15 Nov 2015 04:56:47 +0000 (05:56 +0100)
manga/reader.py

index 442f1f8..295d75a 100644 (file)
@@ -77,6 +77,7 @@ class imgload(future):
 
     def value(self):
         buf = gdkpix.PixbufLoader()
+        done = False
         try:
             with self.page.open() as st:
                 self.p = 0
@@ -89,8 +90,13 @@ class imgload(future):
                     buf.write(read)
                     self.progcb()
             self.st = None
+            done = True
         finally:
-            buf.close()
+            try:
+                buf.close()
+            except:
+                if done:
+                    raise
         return buf.get_pixbuf()
 
     @property