Skip to content

Commit 29e4aec

Browse files
committed
TST #172 raise with message
1 parent 03575b2 commit 29e4aec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apstools/plans.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ def get_command_list(filename):
156156
return command list from either text or Excel file
157157
"""
158158
full_filename = os.path.abspath(filename)
159-
assert os.path.exists(full_filename)
159+
if not os.path.exists(full_filename):
160+
raise IOError(f"file not found: {filename}")
160161
try:
161162
commands = parse_Excel_command_file(filename)
162163
except APS_utils.ExcelReadError:

0 commit comments

Comments
 (0)