From 6476e08063a5328ce6e7335e9ab6f80d86ef0e13 Mon Sep 17 00:00:00 2001
From: Fabien Morin <fabien@nexedi.com>
Date: Wed, 30 Dec 2009 15:33:32 +0000
Subject: [PATCH] code simplification

the return made in try and in except was the same. Take it of from both and put
it after.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31540 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/Image.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/product/ERP5/Document/Image.py b/product/ERP5/Document/Image.py
index d95cc33868..de57b1f8b7 100644
--- a/product/ERP5/Document/Image.py
+++ b/product/ERP5/Document/Image.py
@@ -345,11 +345,10 @@ class Image(File, OFSImage):
                 resolution=resolution, frame=frame, image_size=image_size)
       try:
         mime, image = self.getConversion(**kw)
-        return mime, image.data
       except KeyError:
         mime, image = self._makeDisplayPhoto(**kw)
         self.setConversion(image, mime, **kw)
-        return mime, image.data
+      return mime, image.data
     return self.getContentType(), self.getData()
 
   security.declareProtected(Permissions.View, 'getSearchableText')
-- 
2.30.9