summaryrefslogtreecommitdiff
path: root/alot/crypto.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2013-03-16 17:39:56 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2013-03-16 17:39:56 +0000
commitd3c1880a60ddd8ded397d92cddf310a948b97fdc (patch)
tree7835ba12b1ad9a345c20be46baeda72b8c2a7549 /alot/crypto.py
parentd811fd566e82f4df85456f5639ab8aae7f517531 (diff)
pep8/pyflakes fixes
Diffstat (limited to 'alot/crypto.py')
-rw-r--r--alot/crypto.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/alot/crypto.py b/alot/crypto.py
index 3a130478..6281ecfd 100644
--- a/alot/crypto.py
+++ b/alot/crypto.py
@@ -67,7 +67,7 @@ def _hash_algo_name(hash_algo):
else:
raise GPGProblem(("Invalid hash_algo passed to hash_algo_name."
" Please report this as a bug in alot."),
- code=GPGCode.INVALID_HASH)
+ code=GPGCode.INVALID_HASH)
def RFC3156_micalg_from_algo(hash_algo):
@@ -127,7 +127,7 @@ def get_key(keyid, validate=False, encrypt=False, sign=False):
raise GPGProblem(("More than one key found matching this filter." +
" Please be more specific (use a key ID like " +
"4AC8EE1D)."),
- code=GPGCode.AMBIGUOUS_NAME)
+ code=GPGCode.AMBIGUOUS_NAME)
elif e.code == gpgme.ERR_INV_VALUE or e.code == gpgme.ERR_EOF:
raise GPGProblem("Can not find key for \'" + keyid + "\'.",
code=GPGCode.NOT_FOUND)
@@ -205,6 +205,7 @@ def hash_key(key):
hash_str += tmp_key.keyid
return hash_str
+
def validate_key(key, sign=False, encrypt=False):
if key.revoked:
raise GPGProblem("The key \"" + key.uids[0].uid + "\" is revoked.",