aboutsummaryrefslogtreecommitdiffstats
path: root/plugin.py
diff options
context:
space:
mode:
authoralezakos <electrovesta@gmail.com>2020-08-09 16:48:17 +0300
committerGitHub <noreply@github.com>2020-08-09 16:48:17 +0300
commit65c3752b38fa827f816c63a6f864c60f3ea71f86 (patch)
tree6f8b25d28688f885de1b0a788e77358fe1dc67d5 /plugin.py
parentb431c5476514784f97985419323cf4bec9a61500 (diff)
parent5a0215deac647f52da3e24dc47057af3b132654e (diff)
downloadsupybot_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.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/plugin.py b/plugin.py
index 166e353..e5010c9 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,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

© 2014-2024 Faster IT GmbH | imprint | privacy policy