ShrinkUrl: Fix the check for ur1ca results.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
James McCoy 2013-08-24 08:51:33 -04:00
parent ea7f1f8419
commit 0283bb7f9a

View File

@ -268,7 +268,7 @@ class ShrinkUrl(callbacks.PluginRegexp):
parameters = utils.web.urlencode({'longurl': url})
response = utils.web.getUrl(self._ur1Api, data=parameters)
ur1ca = self._ur1Regexp.search(response.decode()).group('url')
if ur1ca > 0 :
if ur1ca:
self.db.set('ur1', url, ur1ca)
return ur1ca
else: