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.
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 causeConfigParser.update_host
to try deletingidentityfile
inoptions
, but ifidentityfile
is not inoptions
for whatever reason,update_host
will raise KeyError exception hence /edit will fail with 400. By checking each key in options beforedel
, KeyError could be avoided.