Skip to content
Snippets Groups Projects
Commit 5c286a45 authored by Izzard, Robert Dr (Maths & Physics)'s avatar Izzard, Robert Dr (Maths & Physics)
Browse files

put file open in an exception

parent 863fb8ad
No related branches found
No related tags found
No related merge requests found
......@@ -27,11 +27,11 @@ class HPC(condor,slurm):
"""
if joinlist is None:
joinlist = self.grid_options['joinlist']
f = open(joinlist,'r',encoding='utf-8')
if f:
try:
f = open(joinlist,'r',encoding='utf-8')
list = f.read().splitlines()
f.close()
else:
except:
print("Failed to open joinlist at {list}".format(list=joinlist))
self.exit(code=1)
return list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment