Skip to content

Commit

Permalink
rewrote PGPKey.parse; some other API changes; some cleanups; and a Py…
Browse files Browse the repository at this point in the history
…thon 2.x compatibility fix
  • Loading branch information
Commod0re committed Sep 26, 2014
1 parent 9583136 commit 38a4f9f
Show file tree
Hide file tree
Showing 3 changed files with 163 additions and 140 deletions.
6 changes: 6 additions & 0 deletions pgpy/packet/subpackets/signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,12 @@ def __bytes__(self):
_bytes += self.int_to_bytes(int(self.primary))
return _bytes

def __bool__(self):
return self.primary

def __nonzero__(self):
return self.__bool__()

def parse(self, packet):
super(PrimaryUserID, self).parse(packet)
self.primary = packet[:1]
Expand Down

0 comments on commit 38a4f9f

Please sign in to comment.