python-etcd icon indicating copy to clipboard operation
python-etcd copied to clipboard

ValueError if first host is not reachable and `use_proxies=True`

Open fasaxc opened this issue 9 years ago • 0 comments

I tried supplying multiple hosts, the first of which was down as proxies. Rather than falling back to the next host, I get this value error:

>>> c = etcd.Client(host=(("localhost", 1234), ("localhost", 4001)), allow_reconnect=True, u
se_proxies=True)
>>> c.get("calico")
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/gulfstream/git/python-etcd/src/etcd/client.py", line 631, in get
    return self.read(key)
  File "/home/gulfstream/git/python-etcd/src/etcd/client.py", line 488, in read
    timeout=timeout)
  File "/home/gulfstream/git/python-etcd/src/etcd/client.py", line 813, in api_execute
    self._machines_cache.remove(self._base_uri)
ValueError: list.remove(x): x not in list

fasaxc avatar Feb 17 '16 11:02 fasaxc