get_profile() - Use tuple instead of list.
Fixes fix 39b7e606
handle new OpenSSH DSA key format.
This commit is contained in:
parent
39b7e606df
commit
f228909710
@ -115,12 +115,12 @@ class Profile(object):
|
|||||||
end_found = False
|
end_found = False
|
||||||
for l in lines:
|
for l in lines:
|
||||||
l = l.strip()
|
l = l.strip()
|
||||||
if l.startswith(['-----BEGIN DSA PRIVATE KEY-----',
|
if l.startswith(('-----BEGIN DSA PRIVATE KEY-----',
|
||||||
'-----BEGIN OPENSSH PRIVATE KEY-----']):
|
'-----BEGIN OPENSSH PRIVATE KEY-----')):
|
||||||
begin_found = True
|
begin_found = True
|
||||||
continue
|
continue
|
||||||
if l.startswith(['-----END DSA PRIVATE KEY-----',
|
if l.startswith(('-----END DSA PRIVATE KEY-----',
|
||||||
'-----END OPENSSH PRIVATE KEY-----']):
|
'-----END OPENSSH PRIVATE KEY-----')):
|
||||||
end_found = True
|
end_found = True
|
||||||
continue
|
continue
|
||||||
key += l
|
key += l
|
||||||
|
Loading…
Reference in New Issue
Block a user