diff options
author | Lans Zhang <jia.zhang@windriver.com> | 2017-07-25 14:42:46 +0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2021-11-28 20:24:17 -0500 |
commit | b79892d9e096851fc3f4d594afc509a745167863 (patch) | |
tree | 3b406fce00db08c6738b600f2a2645438a5f6b71 | |
parent | a598ca14d6451343c69be97e0e1c65eb15c0e607 (diff) |
hostkeys: fix raising KeyError in SubDict.__delitem__()
If the specified key type is found out, the exception KeyError should
not happen.
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
-rw-r--r-- | paramiko/hostkeys.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/paramiko/hostkeys.py b/paramiko/hostkeys.py index d0660cc8..94474e40 100644 --- a/paramiko/hostkeys.py +++ b/paramiko/hostkeys.py @@ -156,6 +156,7 @@ class HostKeys(MutableMapping): for e in list(self._entries): if e.key.get_name() == key: self._entries.remove(e) + break else: raise KeyError(key) |