diff options
author | Dan McGee <dan@archlinux.org> | 2012-08-20 23:48:44 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-08-20 23:48:44 -0500 |
commit | 78553abc51ba0f18e1c3bec015c9a11d4760c522 (patch) | |
tree | 71e96853d8dbc68463beae6aff143b90fda7f553 | |
parent | f7289625000d0f83675fc5a70650b49707338dca (diff) |
Don't blow up when pgp signature data is '' on a package
We handled None/NULL correctly, but not the empty string. Fix this
corner case.
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | main/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py index 014464ff..42f8e89a 100644 --- a/main/models.py +++ b/main/models.py @@ -143,6 +143,8 @@ class Package(models.Model): data = b64decode(self.pgp_signature) except TypeError: return None + if not data: + return None data = BinaryData(data) packets = list(data.packets()) return packets[0] |