Fixes bug #10225 - Runtime error
Prevents an exception from raising in some corner cases where SSH might be misconfigured. It seems not to fix a specific problem, although it makes the method a little bit more solid.
This commit is contained in:
parent
1cb47c807e
commit
2dc910bd14
1 changed files with 2 additions and 0 deletions
|
@ -237,6 +237,8 @@ class Connection(ConnectionBase):
|
||||||
if line is None or " " not in line:
|
if line is None or " " not in line:
|
||||||
continue
|
continue
|
||||||
tokens = line.split()
|
tokens = line.split()
|
||||||
|
if not tokens:
|
||||||
|
continue
|
||||||
if tokens[0].find(self.HASHED_KEY_MAGIC) == 0:
|
if tokens[0].find(self.HASHED_KEY_MAGIC) == 0:
|
||||||
# this is a hashed known host entry
|
# this is a hashed known host entry
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue