From 9182582589995a7c9749323fec102192046f4026 Mon Sep 17 00:00:00 2001 From: s3lph <1375407-s3lph@users.noreply.gitlab.com> Date: Tue, 31 Jan 2023 02:07:33 +0100 Subject: [PATCH] fix(client): Choose correct fingerprint for pubkey --- client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client.py b/client.py index f1e8042..eb26d47 100755 --- a/client.py +++ b/client.py @@ -540,8 +540,8 @@ def _gpg_get_uid_fp(address: str): elif line.startswith('fpr:'): fpr = line.split(':')[9] fprs.append(fpr) - valid = {fprs[i]: pub for i, pub in enumerate(pubs) if not revoked[i]} - revoked = {fprs[i]: pub for i, pub in enumerate(pubs) if revoked[i]} + valid = {next((f for f in fprs if f.endswith(pub))): pub for i, pub in enumerate(pubs) if not revoked[i]} + revoked = {next((f for f in fprs if f.endswith(pub))): pub for i, pub in enumerate(pubs) if revoked[i]} if len(valid) == 0: raise ValueError(f'No valid key found for {address}.') elif len(valid) > 1: