

def getparam(self, ext, filter=None):
    "Gets the parameter associated with an extension.\n\n        :param ext: The extension to get the parameter for.\n        :param filter: An optional filter function to modify the returned\n                       parameter, if it exists, e.g. :func:`int()`.\n        :returns: Returns None if the extension doesn't exist, the extension\n                  doesn't have a parameter, or the filter function raises\n                  :class:`ValueEror`.\n\n        "
    try:
        param = self.extensions[ext.upper()]
    except KeyError:
        return None
    if filter:
        try:
            return filter(param)
        except ValueError:
            return None
    else:
        return param

dataset/ETHPy150Open slimta/python-slimta/slimta/smtp/extensions.py Extensions.getparam/original