summaryrefslogtreecommitdiff
path: root/paramiko/hostkeys.py
diff options
context:
space:
mode:
authorJeremy T. Bouse <Jeremy.Bouse@UnderGrid.net>2015-10-25 22:29:44 -0400
committerJeremy T. Bouse <Jeremy.Bouse@UnderGrid.net>2015-10-25 22:29:44 -0400
commitad30777fe9b9b34797ba7487056966d27d890974 (patch)
treefd14ac1ad24a701986483860e1218e7cdc09c732 /paramiko/hostkeys.py
parent767153f789ed210fe00509f591b013320fc0f3fa (diff)
parentbf855e6da326dba0c46f005eedc9f390c6c3b206 (diff)
downloadpython-paramiko-ad30777fe9b9b34797ba7487056966d27d890974.tar
python-paramiko-ad30777fe9b9b34797ba7487056966d27d890974.tar.gz
Merge tag 'upstream/1.15.3'
Upstream version 1.15.3
Diffstat (limited to 'paramiko/hostkeys.py')
-rw-r--r--paramiko/hostkeys.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/paramiko/hostkeys.py b/paramiko/hostkeys.py
index 8486887..c7e1f72 100644
--- a/paramiko/hostkeys.py
+++ b/paramiko/hostkeys.py
@@ -35,6 +35,7 @@ from paramiko.dsskey import DSSKey
from paramiko.rsakey import RSAKey
from paramiko.util import get_logger, constant_time_bytes_eq
from paramiko.ecdsakey import ECDSAKey
+from paramiko.ssh_exception import SSHException
class HostKeys (MutableMapping):
@@ -96,7 +97,10 @@ class HostKeys (MutableMapping):
line = line.strip()
if (len(line) == 0) or (line[0] == '#'):
continue
- e = HostKeyEntry.from_line(line, lineno)
+ try:
+ e = HostKeyEntry.from_line(line, lineno)
+ except SSHException:
+ continue
if e is not None:
_hostnames = e.hostnames
for h in _hostnames: