If we have sniffed no hosts, consider our sniff failed

This commit is contained in:
Honza Král
2013-11-03 22:38:30 +01:00
parent a673682cb4
commit 9e68ea91ed
+5
View File
@@ -174,6 +174,11 @@ class Transport(object):
if host is not None:
hosts.append(host)
# we weren't able to get any nodes, maybe using an incompatible
# transport_schema or host_info_callback blocked all - raise error.
if not hosts:
raise TransportError("Enable to sniff hosts - no viable hosts found.")
self.set_connections(hosts)
def mark_dead(self, connection):