summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2017-01-27 11:25:46 -0200
committerdrebs <drebs@leap.se>2017-01-27 11:25:46 -0200
commit28936b276cc2fa8f3572c9248ed4bc5bef4ea7c4 (patch)
treef725ba728ea68a4e3f96fc4130d3ea35ae9eb89e
parentc02c73fea4901edd4002c3a317295c252ae426ca (diff)
[style] pep8 fixes
-rw-r--r--src/leap/mx/mail_receiver.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/leap/mx/mail_receiver.py b/src/leap/mx/mail_receiver.py
index b8eb2ae..b200772 100644
--- a/src/leap/mx/mail_receiver.py
+++ b/src/leap/mx/mail_receiver.py
@@ -204,13 +204,13 @@ class MailReceiver(Service):
key = gpg.list_keys().pop()
encryption_result = gpg.encrypt(
- json.dumps(data, ensure_ascii=False),
- key["fingerprint"],
- symmetric=False)
+ json.dumps(data, ensure_ascii=False),
+ key["fingerprint"],
+ symmetric=False)
- if encryption_result.ok == False:
- log.msg("_encrypt_message: Encryption Failed"
- "Status: %r" % (encryption_result.status,))
+ if not encryption_result.ok:
+ log.msg("_encrypt_message: Encryption failed with status: %r"
+ % (encryption_result.status,))
return None
doc.content = {