Sat, 11 Apr 2015 21:02:54 +0300
- fixed a derp in commitsdb
import bitly_api import irc as Irc from configfile import Config def shorten_link (link): bitly_token = Config.get_node ('bitly').get_value ('access_token', '') if bitly_token: c = bitly_api.Connection (access_token = bitly_token) try: return c.shorten (link)['url'] except Exception as e: Irc.broadcast ('Error while shortening link "%s": %s' % (link, e)) return link