diff options
author | Dan McGee <dan@archlinux.org> | 2013-11-06 22:05:18 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-11-06 22:05:18 -0600 |
commit | a4cf77ba247605fb442b314e311de2829bb3706b (patch) | |
tree | b218aaa8152706624a6cf743e1c430b531a75f38 /main/models.py | |
parent | cf27baf51956747f9ea5a349d41e796031871c5c (diff) |
Move signature data from base64 string to bytes type
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main/models.py')
-rw-r--r-- | main/models.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/main/models.py b/main/models.py index 91f1483b..70872c60 100644 --- a/main/models.py +++ b/main/models.py @@ -1,4 +1,3 @@ -from base64 import b64decode from datetime import datetime from itertools import groupby from pgpdump import BinaryData @@ -141,13 +140,9 @@ class Package(models.Model): @property def signature(self): - try: - data = b64decode(self.pgp_signature.encode('utf-8')) - except TypeError: - return None - if not data: + if not self.signature_bytes: return None - data = BinaryData(data) + data = BinaryData(self.signature_bytes) packets = list(data.packets()) return packets[0] |