def status(self, port):
        if is_osx():
            has_local_address = self.local_address in loopback.list_addresses()
        else:
            has_local_address = True  # linux has 127.*.*.* bound to the loopback interface, like a sir

        hosts_mapping = hosts.get(self.destination)
        is_tunnel_running = tunnel.status(self.local_address, port, self.destination, self.proxy)

        if not is_tunnel_running and hosts_mapping != self.local_address:
            return False
        elif not has_local_address:
            raise MoxieException("Missing loopback address {0}".format(self.local_address))
        elif not is_tunnel_running:
            raise MoxieException("SSH tunnel not running")
        elif hosts_mapping != self.local_address:
            raise MoxieException("'{1}' doesn't map to '{2}' in /etc/hosts".format(self.destination, self.local_address))
        else:
            return True
dataset/ETHPy150Open HubSpot/moxie/moxie/route.py/Route.status/original