aboutsummaryrefslogtreecommitdiff
path: root/modules/github.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/github.py')
-rw-r--r--modules/github.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/github.py b/modules/github.py
index c26f7863..6e17e41a 100644
--- a/modules/github.py
+++ b/modules/github.py
@@ -105,9 +105,12 @@ class Module(ModuleManager.BaseModule):
return ""
def _short_url(self, url):
- page = utils.http.request("https://git.io", method="POST",
- post_data={"url": url})
- return page.headers["Location"]
+ try:
+ page = utils.http.request("https://git.io", method="POST",
+ post_data={"url": url})
+ return page.headers["Location"]
+ except utils.http.HTTPTimeoutException:
+ return url
def _change_count(self, n, symbol, color):
return utils.irc.color("%s%d" % (symbol, n), color)+utils.irc.bold("")