web.isgd() now throws an error when it cant shorten a URL
This commit is contained in:
parent
28345b9c56
commit
72ed3c504f
5 changed files with 36 additions and 15 deletions
|
@ -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 = []
|
||||
|
|
Reference in a new issue