diff options
author | Robey Pointer <robey@twitter.com> | 2009-07-19 20:26:44 -0700 |
---|---|---|
committer | Robey Pointer <robey@twitter.com> | 2009-07-19 20:26:44 -0700 |
commit | 62bc0ad79ac882cbef1b2f061e709ab781ccb80c (patch) | |
tree | a5f414a35847cc7903cabe2feaff2268071ab022 | |
parent | b4220657befbbd12831d3f9bd438ad7cf466c39b (diff) |
ignore extra fields in a hosts file, since apparently some apps are putting comments on the same line (?).
-rw-r--r-- | paramiko/hostkeys.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/paramiko/hostkeys.py b/paramiko/hostkeys.py index 851d2b17..09922d48 100644 --- a/paramiko/hostkeys.py +++ b/paramiko/hostkeys.py @@ -53,9 +53,10 @@ class HostKeyEntry: @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(',') |