diff options
author | drebs <drebs@leap.se> | 2013-02-19 13:55:45 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-02-19 13:55:45 -0300 |
commit | 5a87a01954d67010a073a449cc6d24cae5e9c4d1 (patch) | |
tree | 13860ac9d732436e0ae73f007b56e7df7d2d11f4 | |
parent | 8bf2cfc9ec699eceee49c04360434d9c7b0cdf45 (diff) |
Fix GPGWrapper new helper methods.
-rw-r--r-- | util.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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() |