Skip to content

Commit

Permalink
Execute the module to access the funtion in its namespace (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
analkumar2 authored Nov 8, 2024
1 parent a6db169 commit 71598d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/rdesigneur/rdesigneur.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 71598d1

Please sign in to comment.