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
|
@ -32,4 +32,9 @@ def fact(inp, say=False, nick=False):
|
|||
attempts += 1
|
||||
continue
|
||||
|
||||
return "%s - %s" % (fact, web.isgd(link))
|
||||
try:
|
||||
url = web.isgd(link)
|
||||
except (web.ShortenError, http.HTTPError):
|
||||
url = link
|
||||
|
||||
return "%s - %s" % (fact, url)
|
||||
|
|
Reference in a new issue