Commit c31c4482 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Clean up logic of read in result

parent edcdcbfd
......@@ -27,10 +27,12 @@ def read_in_result(outdir=None, label=None, filename=None):
"""
if filename is None:
filename = result_file_name(outdir, label)
elif (outdir is None or label is None) and filename is None:
raise ValueError("No information given to load file")
if os.path.isfile(filename):
return Result(deepdish.io.load(filename))
else:
raise ValueError("No information given to load file")
raise ValueError("No result found")
class Result(dict):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment