aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2021-05-31 03:28:20 +0300
committerkongr45gpen <electrovesta@gmail.com>2021-05-31 03:28:20 +0300
commitfd6622b872fce1300d0d2043d3ed3bba15c7759c (patch)
tree1ebd2f8693ba7836be31ba8a63c84eaa92544c81
parent5c2f8206d298ba45f66888e6b8db2541149af1c0 (diff)
downloadsupybot_github-fd6622b872fce1300d0d2043d3ed3bba15c7759c.tar.gz
supybot_github-fd6622b872fce1300d0d2043d3ed3bba15c7759c.tar.bz2
supybot_github-fd6622b872fce1300d0d2043d3ed3bba15c7759c.zip
Fix reloads on pythonv3
-rw-r--r--__init__.py2
-rw-r--r--plugin.py7
2 files changed, 4 insertions, 5 deletions
diff --git a/__init__.py b/__init__.py
index 97f40ae..107636d 100644
--- a/__init__.py
+++ b/__init__.py
@@ -25,7 +25,7 @@ __url__ = 'https://github.com/kongr45gpen/supybot-github'
from . import config
from . import plugin
-from imp import reload
+from importlib import reload
reload(plugin) # In case we're being reloaded.
# Add more reloads here if you add third-party modules and want them to be
# reloaded when this plugin is reloaded. Don't forget to import them as well!
diff --git a/plugin.py b/plugin.py
index e5010c9..a93de96 100644
--- a/plugin.py
+++ b/plugin.py
@@ -50,10 +50,9 @@ from .local import globals
from .local.handler import GithubHandler as RequestHandler
from .local import utility as Utility
-from imp import reload
-
globals.init()
+import importlib
class Github(callbacks.Plugin):
"""Add the help for \"@plugin help Github\" here
@@ -95,8 +94,8 @@ class Github(callbacks.Plugin):
self.httpd.server_close()
self.httpd.shutdown()
self.__parent.die()
- reload(RequestHandler)
- reload(Utility)
+ importlib.reload(RequestHandler)
+ importlib.reload(Utility)
def get(self, irc, msg, args, order, type, garbage):
"""[<order>] [<type>] [<garbage>]

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