From 60a360a4da1847b1c6583d30a095e7f344e2597c Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Wed, 26 Aug 2015 15:17:24 +0200 Subject: [PATCH] Reset _machines_cache before doing next load attempt --- helpers/etcd.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helpers/etcd.py b/helpers/etcd.py index dc9f410d..add736c5 100644 --- a/helpers/etcd.py +++ b/helpers/etcd.py @@ -100,6 +100,8 @@ class Client(etcd.Client): if 'discovery_srv' not in self._config and 'host' not in self._config: raise Exception('Neither discovery_srv nor host are defined in etcd section of config') + self._machines_cache = [] + if 'discovery_srv' in self._config: self._machines_cache = self._get_machines_cache_from_srv(self._config['discovery_srv'])