@@ -61,8 +61,7 @@ def disableParsingCommandLine(self):
61
61
def __getAbsolutePath (self , optionPath ):
62
62
if optionPath [0 ] == "/" :
63
63
return optionPath
64
- else :
65
- return f"{ self .currentSectionPath } /{ optionPath } "
64
+ return f"{ self .currentSectionPath } /{ optionPath } "
66
65
67
66
def addMandatoryEntry (self , optionPath ):
68
67
"""
@@ -446,8 +445,9 @@ def __loadCFGFiles(self):
446
445
Loads possibly several cfg files, in order:
447
446
1. cfg files pointed by DIRACSYSCONFIG env variable (comma-separated)
448
447
2. ~/.dirac.cfg
449
- 3. cfg files specified in addCFGFile calls
450
- 4. cfg files that come from the command line
448
+ 3. DIRAC.rootPath/etc/dirac.cfg
449
+ 4. cfg files specified in addCFGFile calls
450
+ 5. cfg files that come from the command line
451
451
"""
452
452
errorsList = []
453
453
foundCFGFile = False
@@ -466,7 +466,11 @@ def __loadCFGFiles(self):
466
466
foundCFGFile = True
467
467
gConfigurationData .loadFile (os .path .expanduser ("~/.dirac.cfg" ))
468
468
469
- # 3. cfg files specified in addCFGFile calls
469
+ # 3. defaultCFGFile = os.path.join(DIRAC.rootPath, "etc", "dirac.cfg")
470
+ if os .path .isfile (os .path .join (DIRAC .rootPath , "etc" , "dirac.cfg" )):
471
+ foundCFGFile = True
472
+
473
+ # 4. cfg files specified in addCFGFile calls
470
474
for fileName in self .additionalCFGFiles :
471
475
if os .path .isfile (fileName ):
472
476
foundCFGFile = True
@@ -476,7 +480,7 @@ def __loadCFGFiles(self):
476
480
gLogger .debug (f"Could not load file { fileName } : { retVal ['Message' ]} " )
477
481
errorsList .append (retVal ["Message" ])
478
482
479
- # 4 . cfg files that come from the command line
483
+ # 5 . cfg files that come from the command line
480
484
for fileName in self .cliAdditionalCFGFiles :
481
485
if os .path .isfile (fileName ):
482
486
foundCFGFile = True
0 commit comments