'Check to see if this entry matches a given hostname.
@param hostname: A hostname or IP address literal to check against this
entry.
@type hostname: L{bytes}
@return: C{True} if this entry is for the given hostname or IP address,
C{False} otherwise.
@rtype: L{bool}'

def matchesHost(self, hostname):

    if isinstance(hostname, unicode):
        hostname = hostname.encode('utf-8')
    return (hostname in self._hostnames)
