Open yueyongyue opened 7 years ago
The error handling here is a bit suspect, but if leader is None in most cases, something is probably going wrong with your etcd cluster.
for m in self.members:
if m.id == status_response.leader:
leader = m
else:
# raise exception?
leader = None
Only the last cycle ,m.id == status_response.leader ,leader is not None Other conditions leader is None
python-etcd3 version 0.5.2 client.py
336 for m in self.members: 337 if m.id == status_response.leader: 338 leader = m 339 else: 340 # raise exception? 341 leader = None
leader maybe return None in most cases