diff options
author | alezakos <electrovesta@gmail.com> | 2020-08-09 16:48:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-09 16:48:17 +0300 |
commit | 65c3752b38fa827f816c63a6f864c60f3ea71f86 (patch) | |
tree | 6f8b25d28688f885de1b0a788e77358fe1dc67d5 /plugin.py | |
parent | b431c5476514784f97985419323cf4bec9a61500 (diff) | |
parent | 5a0215deac647f52da3e24dc47057af3b132654e (diff) | |
download | supybot_github-65c3752b38fa827f816c63a6f864c60f3ea71f86.tar.gz supybot_github-65c3752b38fa827f816c63a6f864c60f3ea71f86.tar.bz2 supybot_github-65c3752b38fa827f816c63a6f864c60f3ea71f86.zip |
Merge pull request #27 from blast007/python3
Python 3 support
Diffstat (limited to 'plugin.py')
-rw-r--r-- | plugin.py | 18 |
1 files changed, 10 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,11 @@ 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 + +from imp import reload globals.init() @@ -79,7 +81,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 |