diff --git a/frappy/io.py b/frappy/io.py index 53de4bdd..5a59d7c3 100644 --- a/frappy/io.py +++ b/frappy/io.py @@ -63,6 +63,7 @@ class HasIO(Module): io = self.ioClass(ioname, srv.log.getChild(ioname), opts, srv) # pylint: disable=not-callable io.callingModule = [] srv.modules[ioname] = io + srv.dispatcher.register_module(io, ioname) self.ioDict[self.uri] = ioname self.io = ioname diff --git a/frappy/playground.py b/frappy/playground.py index c8b11f26..05647e7b 100644 --- a/frappy/playground.py +++ b/frappy/playground.py @@ -93,8 +93,9 @@ class Dispatcher(dispatcher.Dispatcher): def register_module(self, moduleobj, modulename, export=True): self.log.info('registering %s', modulename) + super().register_module(moduleobj, modulename, export) setattr(main, modulename, moduleobj) - self._modules[modulename] = moduleobj + self.get_module(modulename) logger = MainLogger()