storm icon indicating copy to clipboard operation
storm copied to clipboard

Check deleted_field in options before del it

Open reorx opened this issue 9 years ago • 0 comments

This commit is aimed at fixing PUT /edit 400 problem when edit an item in web interface. When editing in web, if id_file is left empty, it will cause ConfigParser.update_host to try deleting identityfile in options, but if identityfile is not in options for whatever reason, update_host will raise KeyError exception hence /edit will fail with 400. By checking each key in options before del, KeyError could be avoided.

reorx avatar Nov 15 '16 14:11 reorx