Skip to content

Commit

Permalink
Merge pull request #7142 from DIRACGridBot/cherry-pick-2-2d0325009-in…
Browse files Browse the repository at this point in the history
…tegration

[sweep:integration] fix:  look also for DIRAC.rootPath/etc/dirac.cfg
  • Loading branch information
fstagni authored Aug 2, 2023
2 parents cd67daf + c68f2be commit 63ef9e1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/DIRAC/ConfigurationSystem/Client/LocalConfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,9 @@ def __loadCFGFiles(self):
Loads possibly several cfg files, in order:
1. cfg files pointed by DIRACSYSCONFIG env variable (comma-separated)
2. ~/.dirac.cfg
3. cfg files specified in addCFGFile calls
4. cfg files that come from the command line
3. DIRAC.rootPath/etc/dirac.cfg
4. cfg files specified in addCFGFile calls
5. cfg files that come from the command line
"""
errorsList = []
foundCFGFile = False
Expand All @@ -467,7 +468,11 @@ def __loadCFGFiles(self):
foundCFGFile = True
gConfigurationData.loadFile(os.path.expanduser("~/.dirac.cfg"))

# 3. cfg files specified in addCFGFile calls
# 3. defaultCFGFile = os.path.join(DIRAC.rootPath, "etc", "dirac.cfg")
if os.path.isfile(os.path.join(DIRAC.rootPath, "etc", "dirac.cfg")):
foundCFGFile = True

# 4. cfg files specified in addCFGFile calls
for fileName in self.additionalCFGFiles:
if os.path.isfile(fileName):
foundCFGFile = True
Expand All @@ -477,7 +482,7 @@ def __loadCFGFiles(self):
gLogger.debug(f"Could not load file {fileName}: {retVal['Message']}")
errorsList.append(retVal["Message"])

# 4. cfg files that come from the command line
# 5. cfg files that come from the command line
for fileName in self.cliAdditionalCFGFiles:
if os.path.isfile(fileName):
foundCFGFile = True
Expand Down

0 comments on commit 63ef9e1

Please sign in to comment.