

def process_message(self, message):
    if hasattr(message, 'attach_alternative'):
        message.attach_alternative(selector.body, 'text/html')
    soup = BeautifulSoup(message.body)
    for (selector, format) in FIRSTCLASS_PLAINTEXT_RULES.iteritems():
        for el in soup.findAll(selector):
            text = call_or_format(format, dict(el.attrs, text=getattr(el, 'text')))
            el.replaceWith(text)
    text = strip_tags(unicode(soup))
    message.body = text
    return message

dataset/ETHPy150Open amccloud/django-firstclass/firstclass/middleware/text/__init__.py PlainTextMiddleware.process_message/VarMisuse@26/35 `message`->`selector`