Skip to content

Commit 73d9d3d

Browse files
committed
Added a sanity check for the 'extraparams' file.
1 parent d76130f commit 73d9d3d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

structure_threader/structure_threader.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ def runprogram(wrapped_prog, iterations, arg):
7676
mainparams = arg.params
7777
extraparams = os.path.join(os.path.dirname(arg.params),
7878
"extraparams")
79-
cli += ["-m", mainparams, "-e", extraparams]
79+
if os.path.isfile(extraparams) is False:
80+
logging.warning("No 'extraparams' file was found. This is not "
81+
"critical, but it is highly recommended that "
82+
"you use one.")
83+
cli += ["-m", mainparams]
84+
else:
85+
cli += ["-m", mainparams, "-e", extraparams]
8086

8187
elif wrapped_prog == "maverick": # Run MavericK
8288
# MavericK requires a trailing "/" (or "\" if on windows)

0 commit comments

Comments
 (0)