Skip to content

Commit

Permalink
Fix typo and remove '''try'''
Browse files Browse the repository at this point in the history
  • Loading branch information
cleberjsantos committed Aug 6, 2013
1 parent 361e7a9 commit a3a35d2
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/collective/cover/tiles/collection.py
Expand Up @@ -161,14 +161,11 @@ def thumbnail(self, item):
tile_conf = self.get_tile_configuration()
image_conf = tile_conf.get('image', None)
scales = item.restrictedTraverse('@@images')
try:
if image_conf:
scaleconf = image_conf['imgsize']
# scale string is something like: 'mini 200:200'
scale = scaleconf.split(' ')[0] # we need the name only: 'mini'
return scales.scale('image', scale)
except:
return None
if image_conf:
scaleconf = image_conf['imgsize']
# scale string is something like: 'mini 200:200'
scale = scaleconf.split(' ')[0] # we need the name only: 'mini'
return scales.scale('image', scale)

def remove_relation(self):
data_mgr = ITileDataManager(self)
Expand Down

0 comments on commit a3a35d2

Please sign in to comment.