

def mention(sourceURL, targetURL, vouchDomain=None):
    'Process the Webmention of the targetURL from the sourceURL.\n\n    To verify that the sourceURL has indeed referenced our targetURL\n    we run findMentions() at it and scan the resulting href list.\n    '
    app.logger.info(('discovering Webmention endpoint for %s' % sourceURL))
    mentions = ronkyuu.findMentions(sourceURL)
    result = False
    app.logger.info(('mentions %s' % mentions))
    for href in mentions['refs']:
        if ((href != sourceURL) and (href == targetURL)):
            app.logger.info(('post at %s was referenced by %s' % (targetURL, sourceURL)))
            result = processWebmention(sourceURL, targetURL, vouchDomain)
    app.logger.info(('mention() returning %s' % result))
    return result

dataset/ETHPy150Open bear/python-indieweb/indieweb.py mention/original