From 022d25c375383aa559fb57463a7f3852dc1026e5 Mon Sep 17 00:00:00 2001 From: Elad Alfassa Date: Sat, 22 Feb 2014 20:04:36 +0200 Subject: [PATCH] [github] Python 3 support --- github.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/github.py b/github.py index 88d67a5097..078a71f35f 100644 --- a/github.py +++ b/github.py @@ -7,7 +7,11 @@ """ from datetime import datetime -from urllib2 import HTTPError +import sys +if sys.version_info.major < 3: + from urllib2 import HTTPError +else: + from urllib.error import HTTPError import json from willie import web, tools from willie.module import commands, rule, NOLIMIT