aboutsummaryrefslogtreecommitdiffstats
path: root/plugin.py
diff options
context:
space:
mode:
authorScott Wichser <blast007@users.sourceforge.net>2019-01-23 22:38:51 +0000
committerScott Wichser <blast007@users.sourceforge.net>2019-01-23 22:38:51 +0000
commitd85f5f6e634b80416e0cee1c80377978c6f9f6c1 (patch)
treef19e0e6ac524f31b941c7ad30b2347cb8deba532 /plugin.py
parentb431c5476514784f97985419323cf4bec9a61500 (diff)
downloadsupybot_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.py16
1 files changed, 8 insertions, 8 deletions
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

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