':param entry: a HostQueueEntry or a SpecialTask'

def _assert_host_has_no_agent(self, entry):

    if self.host_has_agent(entry.host):
        agent = tuple(self._host_agents.get(entry.host.id))[0]
        raise host_scheduler.SchedulerError(('While    scheduling    %s,    host    %s    already    has    a    host    agent    %s' % (entry, entry.host, agent.task)))
