From d85f5f6e634b80416e0cee1c80377978c6f9f6c1 Mon Sep 17 00:00:00 2001 From: Scott Wichser Date: Wed, 23 Jan 2019 22:38:51 +0000 Subject: Through the use of 2to3 and some manual fixes, the plugin loads successfully on Python 3. --- plugin.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'plugin.py') diff --git a/plugin.py b/plugin.py index 166e353..1e367a4 100644 --- a/plugin.py +++ b/plugin.py @@ -28,11 +28,11 @@ import re import json import time -import Queue -import urllib -import urlparse +import queue +import urllib.request, urllib.parse, urllib.error +import urllib.parse import threading -import BaseHTTPServer +import http.server import supybot.dbi as dbi import supybot.log as log @@ -46,9 +46,9 @@ import supybot.ircutils as ircutils import supybot.registry as registry import supybot.callbacks as callbacks -import local.globals as globals -import local.handler.GithubHandler as RequestHandler -import local.utility as Utility +from .local import globals +from .local.handler import GithubHandler as RequestHandler +from .local import utility as Utility globals.init() @@ -79,7 +79,7 @@ class Github(callbacks.Plugin): def __init__(self, irc): self.__parent = super(Github, self) self.__parent.__init__(irc) - server_class = BaseHTTPServer.HTTPServer + server_class = http.server.HTTPServer self.httpd = server_class((self.address, self.port), RequestHandler.GithubHandler) t = threading.Thread(target=self.ServerStart, args=(self.httpd,)) t.daemon = False -- cgit v1.2.3