From e17f2beb230b3276473d77957e4d6a3f4da2c814 Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Mon, 15 Apr 2013 19:34:57 +0000 Subject: Create method-level docstrings for alias_resolver.StatusCodes. --- src/leap/mx/alias_resolver.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/leap/mx') diff --git a/src/leap/mx/alias_resolver.py b/src/leap/mx/alias_resolver.py index 38311d8..4fc20f5 100644 --- a/src/leap/mx/alias_resolver.py +++ b/src/leap/mx/alias_resolver.py @@ -120,12 +120,30 @@ class StatusCodes(object): 'FAIL': 554, } def __init__(self, status_code=None): - """xxx fill me in""" + """Construct an SMTP status code generator. + + :type status_code: str or int + :param status_code: (optional) see :func:`StatusCode.get`. + """ if status_code: self.get(status_code) def get(self, status_code=None) - """xxx fill me in""" + """Takes an SMTP-like status code and returns an SMTP-like message. + + :type status_code: str or int + :param status_code: The string or integer for the response we want + to give back to the MTA, after looking up an + email address in the local user database. + Can be one of: + * ``OK`` or ``200`` + * ``RETRY`` or ``400`` + * ``BAD`` or ``500`` + * ``NOKEY`` or ``550`` + * ``DEFER`` or ``552`` + * ``DENY`` or ``553`` + * ``FAIL`` or ``554`` + """ if status_code: if isinstance(status_code, str): return status_code, getattr(self, status_code.upper(), None) -- cgit v1.2.3