Skip to content

FIX: remove exec() statement from DIRAC#561

Merged
atsareg merged 3 commits into
DIRACGrid:integrationfrom
KrzysztofCiba:FIX-ReplicaManager-removing-exec-calls
Mar 14, 2012
Merged

FIX: remove exec() statement from DIRAC#561
atsareg merged 3 commits into
DIRACGrid:integrationfrom
KrzysztofCiba:FIX-ReplicaManager-removing-exec-calls

Conversation

@KrzysztofCiba
Copy link
Copy Markdown
Contributor

Hopefully all is done, no more exec() statements in DIRAC.

Instead an object is asked to have a requested method defined using:
hasattr( obj, methodName ) and callable( getattr( obj, methodName) ).

If this is not the case, S_ERROR with message explaining absence of function is returned.

Otherwise the correct method is retrieved and executed using:

fcn = getattr( obj, methodName )
res = fcn( params, *args, **kwargs ) 

depending of previous exec( execString ) implementation.

closes #548

atsareg added a commit that referenced this pull request Mar 14, 2012
…g-exec-calls

FIX: remove exec() statement from DIRAC
@atsareg atsareg merged commit f42c2db into DIRACGrid:integration Mar 14, 2012
fstagni added a commit to Robin-Van-de-Merghel/DIRAC that referenced this pull request Dec 8, 2025
…config

[pre-commit.ci] pre-commit autoupdate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DMS ReplicaManager and python exec

2 participants