From: Fredrik Tolf Date: Sun, 15 Nov 2015 04:56:47 +0000 (+0100) Subject: Ignore double errors from pixbuf-loader closing. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=4177506b90a0e7e152ea31b66d5c50a1a76267cf;p=automanga.git Ignore double errors from pixbuf-loader closing. --- 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