[kupfer: 34/53] quickview: Fix bug in error reporting



commit a774cf5a2de8626d8ed8e862dd5a6deeee4defe0
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Mar 24 17:22:38 2011 +0100

    quickview: Fix bug in error reporting

 kupfer/plugin/quickview.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/plugin/quickview.py b/kupfer/plugin/quickview.py
index 8f62605..877288f 100644
--- a/kupfer/plugin/quickview.py
+++ b/kupfer/plugin/quickview.py
@@ -44,10 +44,9 @@ def load_image_max_size(filename, w, h):
 	try:
 		with open(filename, "rb") as f:
 			shutil.copyfileobj(f, pl)
+		pl.close()
 	except (glib.GError, EnvironmentError) as exc:
 		raise OperationError(exc)
-	finally:
-		pl.close()
 	return pl.get_pixbuf()
 
 class View (Action):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]