Skip to content

Commit

Permalink
Follow plone.api conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
hvelarde committed Jun 16, 2015
1 parent 0188a4c commit 2fd3e41
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/sc/embedder/content/embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,14 @@ def load_oembed(self, action):

v = validation.validatorFor('isURL')
if v(url) != 1:
api.portal.show_message(_(u'Invalid URL'), request=self.request,
type='error')
api.portal.show_message(
_(u'Invalid URL'), request=self.request, type='error')
return

consumer = component.getUtility(IConsumer)
json_data = consumer.get_data(url, maxwidth=None, maxheight=None,
format='json')
json_data = consumer.get_data(
url, maxwidth=None, maxheight=None, format='json')

if json_data is None:
json_data = self.get_fallback(url)
if json_data is None:
Expand Down

0 comments on commit 2fd3e41

Please sign in to comment.