From 2206502ccaaf51b2a009c385004cfd7f11f3f739 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 1 Sep 2018 18:27:10 +0100 Subject: Don't purge children on purge_context() in EventHook, make event_context str(uuid) instead of just uuid in ModuleManager --- ModuleManager.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ModuleManager.py') diff --git a/ModuleManager.py b/ModuleManager.py index 404502e8..d2457ae5 100644 --- a/ModuleManager.py +++ b/ModuleManager.py @@ -49,13 +49,12 @@ class ModuleManager(object): if not inspect.isclass(module.Module): raise ImportError("module '%s' has a Module attribute but it is not a class.") - event_context = uuid.uuid4() + event_context = str(uuid.uuid4()) module_object = module.Module(self.bot, self.events.new_context( event_context)) if not hasattr(module_object, "_name"): module_object._name = name.title() module_object._event_context = event_context - module_object._is_unloaded = False module_object._import_name = name assert not module_object._name in self.modules, ( -- cgit v1.3.1-10-gc9f91