def check(self, ip, port=None):
        """
        """

        try:
            rport = self.port if port is None else port
            url = "http://{0}:{1}{2}".format(ip, rport, self.uri)

            response = utility.requests_get(url)
            found = findall("Apache Tomcat/(.*?)\n", response.content)
            if len(found) > 0 and self.version in found[0]: 
                return True

        except exceptions.Timeout:
            utility.Msg("{0} timeout to {1}:{2}".format(self.platform,
                                                            ip, rport),
                                                        LOG.DEBUG)
        except exceptions.ConnectionError:
            utility.Msg("{0} connection error to {1}:{2}".format(self.platform,
                                                            ip, rport),
                                                        LOG.DEBUG)

        return False
dataset/ETHPy150Open hatRiot/clusterd/src/platform/tomcat/fingerprints/Tomcat4.py/FPrint.check/original