From 4177506b90a0e7e152ea31b66d5c50a1a76267cf Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 15 Nov 2015 05:56:47 +0100 Subject: [PATCH] Ignore double errors from pixbuf-loader closing. --- manga/reader.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/manga/reader.py b/manga/reader.py index 442f1f8..295d75a 100644 --- a/manga/reader.py +++ b/manga/reader.py @@ -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 -- 2.11.0