Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

docstrings

  • Loading branch information...
commit ccf4ecb60e67ab5f26321f5bf3d4d7bb2ccc365e 1 parent b9eb08f
@kennethreitz authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 inbox.py
View
4 inbox.py
@@ -17,6 +17,7 @@
class InboxServer(smtpd.SMTPServer, object):
+ """Logging-enabled SMTPServer instance with handler support."""
def __init__(self, handler, *args, **kwargs):
super(InboxServer, self).__init__(*args, **kwargs)
@@ -37,10 +38,12 @@ def __init__(self, port=None, address=None):
self.collator = None
def collate(self, collator):
+ """Function decorator. Used to specify inbox handler."""
self.collator = collator
return collator
def serve(self, port=None, address=None):
+ """Serves the SMTP server on the given port and address."""
port = port or self.port
address = address or self.address
@@ -54,6 +57,7 @@ def serve(self, port=None, address=None):
log.info('Cleaning up')
def dispatch(self):
+ """Command-line dispatch."""
parser = argparse.ArgumentParser(description='Run an Inbox server.')
parser.add_argument('addr', metavar='addr', type=str, help='addr to bind to')
Please sign in to comment.
Something went wrong with that request. Please try again.