This commit is contained in:
Luke Rogers 2012-04-21 15:57:05 +12:00
parent b387b15c8f
commit 3f937dca91

View file

@ -12,8 +12,8 @@ def shorten(inp, bot=None):
api_key = bot.config.get("api_keys", {}).get("bitly_api", None)
if api_key is None:
return "error: no api key set"
try:
return bitly(inp, api_user, api_key)
except (HTTPError, ShortenError):
return "Could not shorten %s!" % inp
return "Could not shorten '%s'!" % inp