diff options
Diffstat (limited to 'src/leap/mail/incoming/service.py')
-rw-r--r-- | src/leap/mail/incoming/service.py | 12 |
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" |