summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgitnoti.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/gitnoti.py b/gitnoti.py
index b6aefcf..e9c9d40 100755
--- a/gitnoti.py
+++ b/gitnoti.py
@@ -24,7 +24,7 @@ from twisted.internet.task import LoopingCall
have_bitly = False
try:
- import bitly
+ import bitly_api
have_bitly = True
except:
pass
@@ -141,8 +141,9 @@ def repo_commit_msg(repo, branch, commits):
short_url = None
try:
bitly_auth = netrc.netrc().authenticators('bitly')
- bitly_api = bitly.Api(login = bitly_auth[0], apikey = bitly_auth[2])
- short_url = bitly_api.shorten(url)
+ bitly = bitly_api.Connection(login = bitly_auth[0], access_token = bitly_auth[2])
+ r = bitly.shorten(url)
+ short_url = r['url']
except:
short_url = None