Commit 6476e080 authored by Fabien Morin's avatar Fabien Morin

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
parent 8771ddad
......@@ -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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment