~jimmy-sigint/mailman/restapi_additional_attributes

« back to all changes in this revision

Viewing changes to src/mailman/app/bounces.py

  • Committer: Barry Warsaw
  • Date: 2010-09-23 13:37:32 UTC
  • Revision ID: barry@list.org-20100923133732-s2sac879bhz8prdk
Fix typo in scan_message().  (LP: #645897)

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
 
77
77
 
78
78
def scan_message(mlist, msg):
79
 
    """Scan all the message for heuristically determined bounce addresses."""
 
79
    """Scan all the message for heuristically determined bounce addresses.
 
80
 
 
81
    :param mlist: The mailing list.
 
82
    :type mlist: `IMailingList`
 
83
    :param msg: The bounce message to scan.
 
84
    :type msg: `Message`
 
85
    :return: The set of bouncing addresses found in the scanned message.  The
 
86
        set will be empty if no addresses were found.
 
87
    :rtype: set
 
88
    """
80
89
    for detector_class in find_components('mailman.bouncers', IBounceDetector):
81
 
        addresses = detector().process(msg)
 
90
        addresses = detector_class().process(msg)
82
91
        # Detectors may return None or an empty sequence to signify that no
83
92
        # addresses have been found.
84
93
        if addresses:
85
 
            return addresses
86
 
    return []
 
94
            return set(addresses)
 
95
    return set()