def add_host(self, host, port):
        """
        Add a host and port associated to this vulnerability.
        
        :param host: Host instance 
        :type host: Host
        
        :param port: Port instance 
        :type port: Port
        
        :raises: TypeError
        """
        if not isinstance(host, Host):
            raise TypeError("Expected Host, got '%s' instead" % type(host))
        if port is not None:
            if not isinstance(port, Port):
                raise TypeError("Expected Port, got '%s' instead" % type(port))

        self.hosts.append((host, port))

    # ----------------------------------------------------------------------
dataset/ETHPy150Open cr0hn/openvas_to_report/openvas_to_report/libs/data/parsed_data.py/Vulnerability.add_host/original