diff options
author | kongr45gpen <electrovesta@gmail.com> | 2016-01-20 17:47:25 +0200 |
---|---|---|
committer | kongr45gpen <electrovesta@gmail.com> | 2016-01-20 17:47:25 +0200 |
commit | 9ab3fcef5204d5325381b85349e5b8f6c1e62c7b (patch) | |
tree | 82c6a3db09514f021a1be9e1ed67db542e59f3ff | |
parent | 643303860ce80fcbeecb06bc87d5c0ea5c96e4a4 (diff) | |
download | supybot_github-9ab3fcef5204d5325381b85349e5b8f6c1e62c7b.tar.gz supybot_github-9ab3fcef5204d5325381b85349e5b8f6c1e62c7b.tar.bz2 supybot_github-9ab3fcef5204d5325381b85349e5b8f6c1e62c7b.zip |
Resolve issues due to API changes
-rw-r--r-- | local/handler/PushHandler.py | 2 | ||||
-rw-r--r-- | local/utility.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/local/handler/PushHandler.py b/local/handler/PushHandler.py index 19bc436..46e57a7 100644 --- a/local/handler/PushHandler.py +++ b/local/handler/PushHandler.py @@ -19,7 +19,7 @@ def handle(data, theme): isTag = True urls = getShortURL(data['compare']) - if 'base_ref' in data: + if 'base_ref' in data and data['base_ref'] is not None: base_ref = data['base_ref'].split('/',2) baseBranch = base_ref[2] branchFrom = baseBranch diff --git a/local/utility.py b/local/utility.py index cbbb138..9a3520a 100644 --- a/local/utility.py +++ b/local/utility.py @@ -80,7 +80,7 @@ def getShortURL(longurl): url = longurl else: data = 'url=%s' % (longurl) - req = urllib2.Request("http://git.io", data) + req = urllib2.Request("https://git.io/", data) response = urllib2.urlopen(req) url = response.info().getheader('Location') return ircutils.mircColor(url, "purple") |