summaryrefslogtreecommitdiff
path: root/alot/db/envelope.py
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2012-05-01 13:28:44 +0200
committerMichael Stapelberg <michael@stapelberg.de>2012-05-01 13:28:44 +0200
commit7973cef9ff3dd52ed81ff502039c6079b6f891d6 (patch)
tree06f8dbbc5c1d9e15db9a06a10344388029afba7f /alot/db/envelope.py
parentfbdeec92794ff1e8595d0622ea177fbf92b4017f (diff)
bugfix: use has_key for checking if GPG_AGENT_INFO is set
Diffstat (limited to 'alot/db/envelope.py')
-rw-r--r--alot/db/envelope.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/db/envelope.py b/alot/db/envelope.py
index ee33bd69..2d54646d 100644
--- a/alot/db/envelope.py
+++ b/alot/db/envelope.py
@@ -171,7 +171,7 @@ class Envelope(object):
except pyme.errors.GPGMEError as e:
# 11 == GPG_ERR_BAD_PASSPHRASE
if e.getcode() == 11:
- if not os.environ['GPG_AGENT_INFO']:
+ if not os.environ.has_key('GPG_AGENT_INFO'):
raise ConstructMailError(("Bad passphrase and "
"GPG_AGENT_INFO not set. Please setup "
"gpg-agent."))