Skip to content

Commit 08451d4

Browse files
authored
Merge pull request #7138 from fstagni/80_fixes65
[8.0] dirac_production_runjoblocal fix
2 parents 2d03250 + 54c0d70 commit 08451d4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/DIRAC/TransformationSystem/scripts/dirac_production_runjoblocal.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ def __downloadPilotScripts():
6262
"dirac-pilot.py",
6363
"pilotCommands.py",
6464
"pilotTools",
65-
"MessageSender",
66-
"PilotLogger.py",
67-
"PilotLoggerTools.py",
6865
]:
6966
remoteFile = urlopen(
7067
os.path.join("https://raw.githubusercontent.com/DIRACGrid/Pilot/master/Pilot/", fileName),
@@ -94,7 +91,7 @@ def __configurePilot(basepath, vo):
9491
diracdir = os.path.expanduser("~") + os.path.sep
9592
try:
9693
os.rename(diracdir + ".dirac.cfg", diracdir + ".dirac.cfg.old")
97-
except OSError:
94+
except (OSError, FileNotFoundError):
9895
pass
9996
shutil.copyfile(diracdir + "pilot.cfg", diracdir + ".dirac.cfg")
10097

@@ -145,7 +142,10 @@ def main():
145142
__runJobLocally(_jobID, _path, _vo)
146143
finally:
147144
os.chdir(_dir)
148-
os.rename(_dir + ".dirac.cfg.old", _dir + ".dirac.cfg")
145+
try:
146+
os.rename(_dir + ".dirac.cfg.old", _dir + ".dirac.cfg")
147+
except FileNotFoundError:
148+
pass
149149

150150

151151
if __name__ == "__main__":

0 commit comments

Comments
 (0)