Skip to content

Commit 39b047b

Browse files
authored
Merge pull request #7029 from fstagni/80_fixes60
[8.0] fix: make sure to not try to add empty options
2 parents fe7d0d9 + b5ac62d commit 39b047b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,14 +1043,16 @@ def _getPilotOptions(self, queue, **kwargs):
10431043
pilotOptions.append(f"-n {queueDict['Site']}")
10441044

10451045
# Generic Options
1046-
for genericOption in queueDict.get("GenericOptions", "").split(","):
1047-
pilotOptions.append(f"-o {genericOption.strip()}")
1046+
if "GenericOptions" in queueDict:
1047+
for genericOption in queueDict["GenericOptions"].split(","):
1048+
pilotOptions.append(f"-o {genericOption.strip()}")
10481049

10491050
if "SharedArea" in queueDict:
10501051
pilotOptions.append(f"-o '/LocalSite/SharedArea={queueDict['SharedArea']}'")
10511052

1052-
for extraPilotOption in queueDict.get("ExtraPilotOptions", "").split(","):
1053-
pilotOptions.append(extraPilotOption.strip())
1053+
if "ExtraPilotOptions" in queueDict:
1054+
for extraPilotOption in queueDict["ExtraPilotOptions"].split(","):
1055+
pilotOptions.append(extraPilotOption.strip())
10541056

10551057
if "Modules" in queueDict:
10561058
pilotOptions.append(f"--modules={queueDict['Modules']}")

0 commit comments

Comments
 (0)