Skip to content

Commit

Permalink
fix: updated list of Pilot modules
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Jul 28, 2023
1 parent 8a0fe38 commit 54c0d70
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ def __downloadPilotScripts():
"dirac-pilot.py",
"pilotCommands.py",
"pilotTools",
"MessageSender",
"PilotLogger.py",
"PilotLoggerTools.py",
]:
remoteFile = urlopen(
os.path.join("https://raw.githubusercontent.com/DIRACGrid/Pilot/master/Pilot/", fileName),
Expand Down Expand Up @@ -94,7 +91,7 @@ def __configurePilot(basepath, vo):
diracdir = os.path.expanduser("~") + os.path.sep
try:
os.rename(diracdir + ".dirac.cfg", diracdir + ".dirac.cfg.old")
except OSError:
except (OSError, FileNotFoundError):
pass
shutil.copyfile(diracdir + "pilot.cfg", diracdir + ".dirac.cfg")

Expand Down Expand Up @@ -145,7 +142,10 @@ def main():
__runJobLocally(_jobID, _path, _vo)
finally:
os.chdir(_dir)
os.rename(_dir + ".dirac.cfg.old", _dir + ".dirac.cfg")
try:
os.rename(_dir + ".dirac.cfg.old", _dir + ".dirac.cfg")
except FileNotFoundError:
pass


if __name__ == "__main__":
Expand Down

0 comments on commit 54c0d70

Please sign in to comment.