diff options
| author | 2018-10-03 13:22:37 +0100 | |
|---|---|---|
| committer | 2018-10-03 13:22:37 +0100 | |
| commit | 69d58eede2e9bf83aa1ed1d8fcf956efde494726 (patch) | |
| tree | 11aa30f2a357f3be23ad97315dae3df051455cbe /src/ModuleManager.py | |
| parent | Add 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.py | 6 |
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"]) |
