Skip to content

Commit 99aeac7

Browse files
author
Robin VAN DE MERGHEL
committed
fix: Remove error when a future client is not available to warn instead
1 parent d97d777 commit 99aeac7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/DIRAC/Core/Tornado/Client/ClientSelector.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,13 @@ def ClientSelector(disetClient, *args, **kwargs): # We use same interface as RP
6666
# If we are not already given a URL, resolve it
6767
if serviceName.startswith(("http", "dip")):
6868
completeUrl = serviceName
69-
elif useLegacyAdapter(serviceName):
70-
sLog.debug(f"Using legacy adapter for service {serviceName}")
71-
if diracxClient is None:
72-
raise NotImplementedError(
73-
"DiracX is enabled but no diracxClient is provided, do you need to update your client?"
74-
)
69+
elif useLegacyAdapter(serviceName) and diracxClient is not None:
7570
return diracxClient()
7671
else:
72+
if diracxClient:
73+
# Only warn to deactivate it without making the code crash.
74+
sLog.warn("DiracX is enabled but no diracxClient is provided, do you need to update your client?")
75+
7776
completeUrl = getServiceURL(serviceName)
7877
sLog.debug(f"URL resolved: {completeUrl}")
7978

0 commit comments

Comments
 (0)