Skip to content

Commit 6d95de2

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 382f2f3 commit 6d95de2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)