def brokenReport(self):
        self.reporter("Broken Links")
        as_html = current.test_config.html
        self.broken_links_count = 0
        for (url, rd_obj) in self.results.items():
            if as_html:
                print_url = (self.homeURL, url, url) % "<a href=%s%s target=\"_blank\">%s</a>"
            else:
                print_url = url
            if rd_obj.is_broken():
                if rd_obj.threw_exception():
                    msg = "(Exception) %s" % print_url
                else:
                    http_code = rd_obj.return_http_code()
                    ticket = rd_obj.the_ticket(as_html)
                    try:
                        parent = self.urlParentList[url]
                        if as_html:
                            parent = "<a href=%s%s target=\"_blank\">Parent</a>" % (self.homeURL, parent)
                    except:
                        parent = "unknown"
                    msg = "%3d. (%s - %s) %s called from %s" % (self.broken_links_count + 1,
                                                                http_code,
                                                                ticket,
                                                                print_url,
                                                                parent
                                                                )
                self.reporter(msg)
                self.broken_links_count += 1
dataset/ETHPy150Open sahana/eden/modules/tests/smoke/broken_links.py/BrokenLinkTest.brokenReport/swapped operands of `%`