summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-02-19 13:55:45 -0300
committerdrebs <drebs@leap.se>2013-02-19 13:55:45 -0300
commit5a87a01954d67010a073a449cc6d24cae5e9c4d1 (patch)
tree13860ac9d732436e0ae73f007b56e7df7d2d11f4
parent8bf2cfc9ec699eceee49c04360434d9c7b0cdf45 (diff)
Fix GPGWrapper new helper methods.
-rw-r--r--util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.py b/util.py
index 2103c056..fe24df39 100644
--- a/util.py
+++ b/util.py
@@ -161,7 +161,7 @@ class GPGWrapper(gnupg.GPG):
"""
# TODO: make this support multiple keys.
result = self.list_packets(raw_data)
- if not result.encrypted_sym:
+ if not result.key:
raise LookupError(
"Content is not encrypted to a GnuPG key!")
return self.find_key_by_subkey(result.key)
@@ -172,7 +172,7 @@ class GPGWrapper(gnupg.GPG):
def is_encrypted_asym(self, raw_data):
result = self.list_packets(raw_data)
- return bool(result.need_passphrase)
+ return bool(result.key)
def is_encrypted(self, raw_data):
self.is_encrypted_asym() or self.is_encrypted_sym()