diff --git a/src/DIRAC/Workflow/Modules/Script.py b/src/DIRAC/Workflow/Modules/Script.py index 910587ae8a1..b3eb1a75c23 100644 --- a/src/DIRAC/Workflow/Modules/Script.py +++ b/src/DIRAC/Workflow/Modules/Script.py @@ -85,8 +85,7 @@ def _executeCommand(self): failed = False # Check whether the execution should be done remotely - is_remote_execution = gConfig.getValue("/LocalSite/RemoteExecution", "false") - if is_remote_execution.lower() in ["true", "yes"]: + if gConfig.getValue("/LocalSite/RemoteExecution", False): remoteRunner = RemoteRunner( gConfig.getValue("/LocalSite/Site"), gConfig.getValue("/LocalSite/GridCE"), diff --git a/src/DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py b/src/DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py index a5414c33525..79f9f2415df 100644 --- a/src/DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py +++ b/src/DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py @@ -37,7 +37,7 @@ def __init__(self, siteName=None, ceName=None, queueName=None): self.log.warn("Trying to get workloadSite from /LocalSite/CEQueue...") self._workloadQueue = gConfig.getValue("/LocalSite/CEQueue") - @deprecated('Use gConfig.getValue("/LocalSite/RemoteExecution") instead.') + @deprecated('Use gConfig.getValue("/LocalSite/RemoteExecution", False) instead.') def is_remote_execution(self): """Main method: decides whether the execution will be done locally or remotely via a CE. @@ -46,7 +46,7 @@ def is_remote_execution(self): :return: bool """ - return gConfig.getValue("/LocalSite/RemoteExecution") + return gConfig.getValue("/LocalSite/RemoteExecution", False) def execute(self, command, workingDirectory=".", numberOfProcessors=1, cleanRemoteJob=True): """Execute the command remotely via a CE