Skip to content

Commit

Permalink
ignore extra fields in a hosts file, since apparently some apps are p…
Browse files Browse the repository at this point in the history
…utting comments on the same line (?).
  • Loading branch information
Robey Pointer committed Jul 20, 2009
1 parent b422065 commit 62bc0ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paramiko/hostkeys.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ def from_line(cls, line):
@type line: str
"""
fields = line.split(' ')
if len(fields) != 3:
if len(fields) < 3:
# Bad number of fields
return None
fields = fields[:3]

names, keytype, key = fields
names = names.split(',')
Expand Down

0 comments on commit 62bc0ad

Please sign in to comment.