summaryrefslogtreecommitdiff
path: root/src/leap/email/smtp/smtprelay.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-01-28 17:57:17 -0200
committerdrebs <drebs@leap.se>2013-01-28 17:57:17 -0200
commitb164d5025a30ee5d47a6992502bbd80576de9a73 (patch)
treea2857d3312fb6e0963ea2fe8b6daad25cab01ce4 /src/leap/email/smtp/smtprelay.py
parentd461e547f4d239c2b377fdd723937614a98c7723 (diff)
Fix pep8 style.
Diffstat (limited to 'src/leap/email/smtp/smtprelay.py')
-rw-r--r--src/leap/email/smtp/smtprelay.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/leap/email/smtp/smtprelay.py b/src/leap/email/smtp/smtprelay.py
index f44aeb6f..5123db25 100644
--- a/src/leap/email/smtp/smtprelay.py
+++ b/src/leap/email/smtp/smtprelay.py
@@ -39,11 +39,11 @@ class SMTPDelivery(object):
self._gpg = gpg
else:
self._gpg = GPGWrapper()
-
+
def receivedHeader(self, helo, origin, recipients):
myHostname, clientIP = helo
headerValue = "by %s from %s with ESMTP ; %s" % (
- myHostname, clientIP, smtp.rfc822date( ))
+ myHostname, clientIP, smtp.rfc822date())
# email.Header.Header used for automatic wrapping of long lines
return "Received: %s" % Header(headerValue)
@@ -76,7 +76,7 @@ class EncryptedMessage():
implements(smtp.IMessage)
SMTP_HOSTNAME = "mail.riseup.net"
- SMTP_PORT = 25
+ SMTP_PORT = 25
def __init__(self, user, gpg=None):
self.user = user
@@ -94,7 +94,7 @@ class EncryptedMessage():
def eomReceived(self):
"""Encrypt and send message."""
log.msg("Message data complete.")
- self.lines.append('') # add a trailing newline
+ self.lines.append('') # add a trailing newline
self.parseMessage()
try:
self.encrypt()
@@ -148,7 +148,7 @@ class EncryptedMessage():
log.msg("Encrypting to %s" % fp)
self.cyphertext = str(self._gpg.encrypt('\n'.join(self.body), [fp],
always_trust=always_trust))
-
+
# this will be replaced by some other mechanism of obtaining credentials
# for SMTP server.
def getSMTPInfo(self):
@@ -166,8 +166,8 @@ class GPGWrapper():
replaced by a more general class used throughout the project.
"""
- GNUPG_HOME = "~/.config/leap/gnupg"
- GNUPG_BINARY = "/usr/bin/gpg" # this has to be changed based on OS
+ GNUPG_HOME = "~/.config/leap/gnupg"
+ GNUPG_BINARY = "/usr/bin/gpg" # TODO: change this based on OS
def __init__(self, gpghome=GNUPG_HOME, gpgbinary=GNUPG_BINARY):
self.gpg = gnupg.GPG(gnupghome=gpghome, gpgbinary=gpgbinary)