Skip to content

Commit

Permalink
Fix mypy error
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DemiMarie committed Oct 22, 2024
1 parent a198651 commit 80ef103
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion splitgpg2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,9 @@ async def setkeydesc(self, keygrip: bytes) -> None:
assert key is not None, 'no key?'

desc = b'%s\nFingerprint: %s%s' % (
(b'UID: ' + key.first_uid.split(b'\n')[0]) if key.first_uid is not None else '',
(b'UID: ' + key.first_uid.split(b'\n')[0])
if key.first_uid is not None
else b'',
key.fingerprint,
subkey_desc)

Expand Down

0 comments on commit 80ef103

Please sign in to comment.