summaryrefslogtreecommitdiff
path: root/src/leap/mx
diff options
context:
space:
mode:
authorIsis Lovecruft <isis@torproject.org>2013-04-15 19:34:57 +0000
committerIsis Lovecruft <isis@torproject.org>2013-04-15 19:34:57 +0000
commite17f2beb230b3276473d77957e4d6a3f4da2c814 (patch)
tree16af4f17565e3839a1f6da5de8f3300fb05f4850 /src/leap/mx
parentdf6f7a038f3738f76cf7f5bb4a85e17a9a27ec56 (diff)
Create method-level docstrings for alias_resolver.StatusCodes.
Diffstat (limited to 'src/leap/mx')
-rw-r--r--src/leap/mx/alias_resolver.py22
1 files changed, 20 insertions, 2 deletions
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)