Handle KeyError in read_parameter_file

Fixes basic usage of propka after `python setup.py install` followed by
`propka3 1ubq.pdb`
This commit is contained in:
Thomas Holder
2020-06-18 20:19:10 +02:00
parent 0cb470fbdb
commit e80473db33

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)