diff --git a/src/DIRAC/MonitoringSystem/Client/ServerUtils.py b/src/DIRAC/MonitoringSystem/Client/ServerUtils.py index 687275d0aad..e762f1a82a5 100644 --- a/src/DIRAC/MonitoringSystem/Client/ServerUtils.py +++ b/src/DIRAC/MonitoringSystem/Client/ServerUtils.py @@ -11,6 +11,8 @@ def getMonitoringDB(): if gMonitoringDB and gMonitoringDB._connected: return gMonitoringDB except Exception: - from DIRAC.Core.Base.Client import Client + pass - return Client(url="Monitoring/Monitoring") + from DIRAC.Core.Base.Client import Client + + return Client(url="Monitoring/Monitoring") diff --git a/src/DIRAC/WorkloadManagementSystem/Client/ServerUtils.py b/src/DIRAC/WorkloadManagementSystem/Client/ServerUtils.py index 550fec6a138..86a456aa3fe 100644 --- a/src/DIRAC/WorkloadManagementSystem/Client/ServerUtils.py +++ b/src/DIRAC/WorkloadManagementSystem/Client/ServerUtils.py @@ -13,7 +13,9 @@ def getPilotAgentsDB(): if gPilotAgentsDB and gPilotAgentsDB._connected: return gPilotAgentsDB except Exception: - return Client(url="WorkloadManagement/PilotManager") + pass + + return Client(url="WorkloadManagement/PilotManager") def getVirtualMachineDB(): @@ -23,4 +25,6 @@ def getVirtualMachineDB(): if gVirtualMachineDB and gVirtualMachineDB._connected: return gVirtualMachineDB except Exception: - return Client(url="WorkloadManagement/VirtualMachineManager") + pass + + return Client(url="WorkloadManagement/VirtualMachineManager")