Skip to content

Commit 80ef103

Browse files
committed
Fix mypy error
This bug is old, but it only triggers if there are no UIDs, which is why testing didn't reveal it. I suspect old versions of mypy just did not catch the bug.
1 parent a198651 commit 80ef103

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

splitgpg2/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,9 @@ async def setkeydesc(self, keygrip: bytes) -> None:
819819
assert key is not None, 'no key?'
820820

821821
desc = b'%s\nFingerprint: %s%s' % (
822-
(b'UID: ' + key.first_uid.split(b'\n')[0]) if key.first_uid is not None else '',
822+
(b'UID: ' + key.first_uid.split(b'\n')[0])
823+
if key.first_uid is not None
824+
else b'',
823825
key.fingerprint,
824826
subkey_desc)
825827

0 commit comments

Comments
 (0)