Skip to content

Commit 931ebf6

Browse files
committed
Input prefix for plots can now take a path. Fixes #59.
1 parent a7eea6b commit 931ebf6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

structure_threader/structure_threader.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ def plots_only(arg):
319319
# Get all files matching the provided prefix
320320
prefix_dir, prefix_name = os.path.split(arg.prefix)
321321

322-
# TODO: Implement sanity checks on the inputs.
323322
if prefix_dir == "":
324323
prefix_dir = "."
325324

@@ -339,6 +338,11 @@ def plots_only(arg):
339338
x.startswith(prefix_name) and
340339
x.endswith(".csv")]
341340

341+
for filename in infiles:
342+
sanity.file_checker(filename, "There was a problem with the deducted "
343+
" file '{}'. Please check "
344+
"it.".format(filename))
345+
342346
if not infiles:
343347
logging.error("No input files that match the provided prefix. "
344348
"Aborting.")

0 commit comments

Comments
 (0)