aboutsummaryrefslogtreecommitdiff
path: root/src/ModuleManager.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-03 13:22:37 +0100
committerGravatar jesopo2018-10-03 13:22:37 +0100
commit69d58eede2e9bf83aa1ed1d8fcf956efde494726 (patch)
tree11aa30f2a357f3be23ad97315dae3df051455cbe /src/ModuleManager.py
parentAdd a way to not add a user automatically in IRCServer.get_user (diff)
signature
Move src/Utils.py in to src/utils/, splitting functionality out in to modules of
related functionality
Diffstat (limited to 'src/ModuleManager.py')
-rw-r--r--src/ModuleManager.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ModuleManager.py b/src/ModuleManager.py
index 1f229611..5d997f54 100644
--- a/src/ModuleManager.py
+++ b/src/ModuleManager.py
@@ -1,5 +1,5 @@
import gc, glob, imp, io, inspect, os, sys, uuid
-from src import Utils
+from . import utils
BITBOT_HOOKS_MAGIC = "__bitbot_hooks"
BITBOT_EXPORTS_MAGIC = "__bitbot_exports"
@@ -54,7 +54,7 @@ class ModuleManager(object):
def _load_module(self, bot, name):
path = self._module_path(name)
- for hashflag, value in Utils.get_hashflags(path):
+ for hashflag, value in utils.get_hashflags(path):
if hashflag == "ignore":
# nope, ignore this module.
raise ModuleNotLoadedWarning("module ignored")
@@ -92,7 +92,7 @@ class ModuleManager(object):
attribute = getattr(module_object, attribute_name)
for hook in self._get_magic(attribute, BITBOT_HOOKS_MAGIC, []):
context_events.on(hook["event"]).hook(attribute,
- docstring=attribute.__doc__, **hook["kwargs"])
+ **hook["kwargs"])
for export in self._get_magic(module_object, BITBOT_EXPORTS_MAGIC, []):
context_exports.add(export["setting"], export["value"])