Whitespace normalization.
This commit is contained in:
parent
3c61c3525f
commit
658cba6706
|
@ -334,4 +334,3 @@ def readmodule_ex(module, path=[], inpackage=0):
|
||||||
|
|
||||||
def _indent(ws, _expandtabs=string.expandtabs):
|
def _indent(ws, _expandtabs=string.expandtabs):
|
||||||
return len(_expandtabs(ws, TABWIDTH))
|
return len(_expandtabs(ws, TABWIDTH))
|
||||||
|
|
||||||
|
|
16
Lib/smtpd.py
16
Lib/smtpd.py
|
@ -90,7 +90,7 @@ NEWLINE = '\n'
|
||||||
EMPTYSTRING = ''
|
EMPTYSTRING = ''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def usage(code, msg=''):
|
def usage(code, msg=''):
|
||||||
print >> sys.stderr, __doc__ % globals()
|
print >> sys.stderr, __doc__ % globals()
|
||||||
if msg:
|
if msg:
|
||||||
|
@ -98,7 +98,7 @@ def usage(code, msg=''):
|
||||||
sys.exit(code)
|
sys.exit(code)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SMTPChannel(asynchat.async_chat):
|
class SMTPChannel(asynchat.async_chat):
|
||||||
COMMAND = 0
|
COMMAND = 0
|
||||||
DATA = 1
|
DATA = 1
|
||||||
|
@ -263,7 +263,7 @@ class SMTPChannel(asynchat.async_chat):
|
||||||
self.push('354 End data with <CR><LF>.<CR><LF>')
|
self.push('354 End data with <CR><LF>.<CR><LF>')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SMTPServer(asyncore.dispatcher):
|
class SMTPServer(asyncore.dispatcher):
|
||||||
def __init__(self, localaddr, remoteaddr):
|
def __init__(self, localaddr, remoteaddr):
|
||||||
self._localaddr = localaddr
|
self._localaddr = localaddr
|
||||||
|
@ -310,7 +310,7 @@ class SMTPServer(asyncore.dispatcher):
|
||||||
"""
|
"""
|
||||||
raise UnimplementedError
|
raise UnimplementedError
|
||||||
|
|
||||||
|
|
||||||
class DebuggingServer(SMTPServer):
|
class DebuggingServer(SMTPServer):
|
||||||
# Do something with the gathered message
|
# Do something with the gathered message
|
||||||
def process_message(self, peer, mailfrom, rcpttos, data):
|
def process_message(self, peer, mailfrom, rcpttos, data):
|
||||||
|
@ -326,7 +326,7 @@ class DebuggingServer(SMTPServer):
|
||||||
print '------------ END MESSAGE ------------'
|
print '------------ END MESSAGE ------------'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PureProxy(SMTPServer):
|
class PureProxy(SMTPServer):
|
||||||
def process_message(self, peer, mailfrom, rcpttos, data):
|
def process_message(self, peer, mailfrom, rcpttos, data):
|
||||||
lines = data.split('\n')
|
lines = data.split('\n')
|
||||||
|
@ -367,7 +367,7 @@ class PureProxy(SMTPServer):
|
||||||
return refused
|
return refused
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class MailmanProxy(PureProxy):
|
class MailmanProxy(PureProxy):
|
||||||
def process_message(self, peer, mailfrom, rcpttos, data):
|
def process_message(self, peer, mailfrom, rcpttos, data):
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
|
@ -447,7 +447,7 @@ class MailmanProxy(PureProxy):
|
||||||
msg.Enqueue(mlist, torequest=1)
|
msg.Enqueue(mlist, torequest=1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Options:
|
class Options:
|
||||||
setuid = 1
|
setuid = 1
|
||||||
classname = 'PureProxy'
|
classname = 'PureProxy'
|
||||||
|
@ -502,7 +502,7 @@ def parseargs():
|
||||||
return options
|
return options
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
options = parseargs()
|
options = parseargs()
|
||||||
# Become nobody
|
# Become nobody
|
||||||
|
|
Loading…
Reference in New Issue