aboutsummaryrefslogtreecommitdiff
path: root/paramiko/hostkeys.py
diff options
context:
space:
mode:
authorJeremy T. Bouse <Jeremy.Bouse@UnderGrid.net>2015-10-25 22:29:43 -0400
committerJeremy T. Bouse <Jeremy.Bouse@UnderGrid.net>2015-10-25 22:29:43 -0400
commitbf855e6da326dba0c46f005eedc9f390c6c3b206 (patch)
treed8ebc8fcde66e4bd5b8e6725984fda76f21ca4eb /paramiko/hostkeys.py
parentf784a533d6e1d09e89dc254f3493b491e19c94f0 (diff)
downloadpython-paramiko-bf855e6da326dba0c46f005eedc9f390c6c3b206.tar
python-paramiko-bf855e6da326dba0c46f005eedc9f390c6c3b206.tar.gz
Imported Upstream version 1.15.3upstream/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: