storm
storm copied to clipboard
Check deleted_field in options before del it
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.