web.isgd() now throws an error when it cant shorten a URL

This commit is contained in:
Luke Rogers 2012-10-13 12:10:02 +13:00
parent 28345b9c56
commit 72ed3c504f
5 changed files with 36 additions and 15 deletions

View file

@ -22,7 +22,7 @@ def wolframalpha(inp, bot=None):
http.quote_plus(inp.encode('utf-8'))
try:
short_url = web.isgd(query_url)
except (http.HTTPError):
except (web.ShortenError, http.HTTPError):
short_url = query_url
pod_texts = []