Skip to content

Commit

Permalink
feat: use /DIRAC/NoSetup flag to denote no setups used
Browse files Browse the repository at this point in the history
  • Loading branch information
atsareg committed Sep 13, 2024
1 parent e6013ca commit 160b1ba
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/DIRAC/ConfigurationSystem/Client/PathFinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,17 @@ def getSystemInstance(system, setup=False):
an empty string is returned
"""

# If Setup is "None", it means that we have the case of configuration without Setup
setupToUse = setup or gConfigurationData.remoteCFG.getOption("/DIRAC/Setup")
if setupToUse == "None":
# If noSetupFlag is set to True, we do not have system instances
try:
noSetupFlag = gConfigurationData.extractOptionFromCFG("/DIRAC/NoSetup")
if noSetupFlag == "True":
return ""
except:
return ""

# If Setup is "None", it means that we have the case of configuration without Setup
setupToUse = setup or getDIRACSetup()

optionPath = Path.cfgPath("/DIRAC/Setups", setupToUse, system)
instance = gConfigurationData.extractOptionFromCFG(optionPath)
if not instance:
Expand Down

0 comments on commit 160b1ba

Please sign in to comment.