def _hosts_by_success(self, hosts=[]):
hosts = hosts if hosts else self.hosts<EOL>return sorted(hosts, key=lambda h: self._host_errors[h])<EOL>
Order hosts by most successful (least amount of errors) first.

        :param hosts: List of hosts.
        :type hosts: list
        :returns: List of hosts sorted by successful connections.
        :rtype: list