From c7c6d60a9920b9164fc925324a01f71763e5b162 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Tue, 12 Sep 2023 08:18:17 +0200 Subject: [PATCH] further fixes after change 31470 - get_module is to be called when io is autocreated - register_module is missing in playground Change-Id: I28884575b71320667107c494473b0fc5d4363a50 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/32123 Tested-by: Jenkins Automated Tests Reviewed-by: Alexander Zaft Reviewed-by: Markus Zolliker --- frappy/io.py | 1 + frappy/playground.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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()