Merge pull request #65 from jensengroup/read_parameter_file-KeyError

Handle KeyError in read_parameter_file
This commit is contained in:
Nathan Baker
2020-06-19 05:48:09 -07:00
committed by GitHub

View File

@@ -99,7 +99,7 @@ def read_parameter_file(input_file, parameters):
try:
ifile = resource_filename(__name__, input_file)
input_ = open_file_for_reading(ifile)
except (IOError, FileNotFoundError, ValueError):
except (IOError, FileNotFoundError, ValueError, KeyError):
input_ = open_file_for_reading(input_file)
for line in input_:
parameters.parse_line(line)