From 9b89fac9e1f173ecaa0872bcabbfc8e18d4850d4 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 29 Aug 2016 20:36:38 +0530 Subject: [PATCH] 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. --- actions/monkeysphere | 3 +++ 1 file changed, 3 insertions(+) diff --git a/actions/monkeysphere b/actions/monkeysphere index a937a4494..0c2febdc5 100755 --- a/actions/monkeysphere +++ b/actions/monkeysphere @@ -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)