Skip to content

Commit

Permalink
fix: simplify, do not check for exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
atsareg committed Sep 13, 2024
1 parent 160b1ba commit c441cb3
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/DIRAC/ConfigurationSystem/Client/PathFinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,12 @@ def getSystemInstance(system, setup=False):
an empty string is returned
"""

# If noSetupFlag is set to True, we do not have system instances
try:
noSetupFlag = gConfigurationData.extractOptionFromCFG("/DIRAC/NoSetup")
if noSetupFlag == "True":
return ""
except:
# If noSetupFlag is set to True, we do not have system instances in the configuration
noSetupFlag = gConfigurationData.extractOptionFromCFG("/DIRAC/NoSetup")
if noSetupFlag == "True":
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 c441cb3

Please sign in to comment.