From 71598d1ceed969671b2990b2d45545493c82f695 Mon Sep 17 00:00:00 2001 From: Anal Kumar Date: Fri, 8 Nov 2024 13:30:32 +0530 Subject: [PATCH] Execute the module to access the funtion in its namespace (#480) --- python/rdesigneur/rdesigneur.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/rdesigneur/rdesigneur.py b/python/rdesigneur/rdesigneur.py index 0496270f1e..e343b401ff 100644 --- a/python/rdesigneur/rdesigneur.py +++ b/python/rdesigneur/rdesigneur.py @@ -327,6 +327,7 @@ def buildProtoFromFunction( self, func, protoName ): try: # module = imp.load_module(moduleName, moduleFile, pathName, description) module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) funcObj = getattr(module, funcName) funcObj(protoName) return True