diff options
author | Scott Wichser <blast007@users.sourceforge.net> | 2019-01-23 22:38:51 +0000 |
---|---|---|
committer | Scott Wichser <blast007@users.sourceforge.net> | 2019-01-23 22:38:51 +0000 |
commit | d85f5f6e634b80416e0cee1c80377978c6f9f6c1 (patch) | |
tree | f19e0e6ac524f31b941c7ad30b2347cb8deba532 /plugin.py | |
parent | b431c5476514784f97985419323cf4bec9a61500 (diff) | |
download | supybot_github-d85f5f6e634b80416e0cee1c80377978c6f9f6c1.tar.gz supybot_github-d85f5f6e634b80416e0cee1c80377978c6f9f6c1.tar.bz2 supybot_github-d85f5f6e634b80416e0cee1c80377978c6f9f6c1.zip |
Through the use of 2to3 and some manual fixes, the plugin loads successfully on Python 3.
Diffstat (limited to 'plugin.py')
-rw-r--r-- | plugin.py | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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 |