Exit with error if model files are not found.

This commit is contained in:
Matt Guthaus 2018-02-05 15:09:21 -08:00
parent e01d5b7c61
commit 85f4438280
1 changed files with 4 additions and 1 deletions

View File

@ -272,7 +272,10 @@ def write_control(stim_file, end_time):
def write_include(stim_file, models):
"""Writes include statements, inputs are lists of model files"""
for item in list(models):
stim_file.write(".include \"{0}\"\n\n".format(item))
if os.path.isfile(item):
stim_file.write(".include \"{0}\"\n\n".format(item))
else:
debug.error("Could not find spice model: {0}".format(item))
def write_supply(stim_file):