Skip to content

Commit

Permalink
Merge a061f33 into c634d7a
Browse files Browse the repository at this point in the history
  • Loading branch information
drxzcl committed Dec 9, 2021
2 parents c634d7a + a061f33 commit 250e2a7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pgpy/pgp.py
Expand Up @@ -1064,6 +1064,18 @@ def __or__(self, other):
self._sessionkeys += other._sessionkeys
self._signatures += other._signatures
return self

if isinstance(other, Opaque):
# XXX: fix some other time for 'real'
return self # basically ignore packet for now

if isinstance(other, SKEData):
# XXX: fix some other time for 'real'
return self # basically ignore packet for now

if isinstance(other, pgpy.packet.packets.Trust):
# XXX: fix some other time for 'real'
return self # basically ignore packet for now

raise NotImplementedError(str(type(other)))

Expand Down Expand Up @@ -2553,7 +2565,7 @@ def __call__(self, pkt):

# and file away pgpobj
if isinstance(pgpobj, PGPKey):
if pgpobj.is_primary:
if pgpobj.is_primary or not keys: # avoid erroring the else below if next(reversed(keys)) isn't available yet
keys[(pgpobj.fingerprint.keyid, pgpobj.is_public)] = pgpobj

else:
Expand Down

0 comments on commit 250e2a7

Please sign in to comment.