Updated key.py to fix isue #4989

This fixed bug #4989 where delete was not deleting the key when `--yes` was passed