mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
monkeysphere: Handle new format of uids in output
Older format was: uid ssh://host Newer format is: uid [ something] ssh://host I believe this change happened due to migration from gpg to gpg2. Adopt our code to handle both cases.
This commit is contained in:
parent
f68e8612f1
commit
9b89fac9e1
@ -134,6 +134,9 @@ def get_monkeysphere_keys(key_id=None):
|
||||
keys[-1]['date'] = data[1]
|
||||
elif line.startswith('uid'):
|
||||
uid = line.lstrip('uid').strip()
|
||||
if uid.startswith('['):
|
||||
uid = uid[uid.index(']') + 1:].strip()
|
||||
|
||||
keys[-1].setdefault('uids', []).append(uid)
|
||||
matches = re.match('([a-zA-Z]*)://(.*)(:\d*)?', uid)
|
||||
keys[-1]['service'] = matches.group(1)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user