summaryrefslogtreecommitdiff
path: root/src/leap/mail/incoming/service.py
diff options
context:
space:
mode:
authorBruno Wagner <bwgpro@gmail.com>2015-07-21 19:30:33 -0300
committerBruno Wagner <bwgpro@gmail.com>2015-07-21 19:30:33 -0300
commitbb132dcc1b558cfdfd0bf438779fe2ed07827fd5 (patch)
treee895c6438161a3472aa304a1b307541184fa61ec /src/leap/mail/incoming/service.py
parent6ab67b4c69be4d3f3fb34dd3f76cd36822e7e1ca (diff)
Updated pep8 and fixed import and line break warnings
Diffstat (limited to 'src/leap/mail/incoming/service.py')
-rw-r--r--src/leap/mail/incoming/service.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/leap/mail/incoming/service.py b/src/leap/mail/incoming/service.py
index 3daf86b..2bc6751 100644
--- a/src/leap/mail/incoming/service.py
+++ b/src/leap/mail/incoming/service.py
@@ -429,9 +429,9 @@ class IncomingMail(Service):
fromHeader = msg.get('from', None)
senderAddress = None
- if (fromHeader is not None
- and (msg.get_content_type() == MULTIPART_ENCRYPTED
- or msg.get_content_type() == MULTIPART_SIGNED)):
+ if (fromHeader is not None and
+ (msg.get_content_type() == MULTIPART_ENCRYPTED or
+ msg.get_content_type() == MULTIPART_SIGNED)):
senderAddress = parseaddr(fromHeader)[1]
def add_leap_header(ret):
@@ -635,8 +635,10 @@ class IncomingMail(Service):
url = shlex.split(fields['url'])[0] # remove quotations
urlparts = urlparse(url)
addressHostname = address.split('@')[1]
- if (urlparts.scheme == 'https'
- and urlparts.hostname == addressHostname):
+ if (
+ urlparts.scheme == 'https' and
+ urlparts.hostname == addressHostname
+ ):
def fetch_error(failure):
if failure.check(keymanager_errors.KeyNotFound):
logger.warning("Url from OpenPGP header %s failed"