mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-26 15:40:21 +00:00
Do not try to fetch the element from the get_node result if the node is not there.
This commit is contained in:
@@ -139,7 +139,7 @@ class ZooKeeper(AbstractDCS):
|
||||
self.fetch_cluster = True
|
||||
|
||||
# get initialize flag
|
||||
initialize = self.get_node(self.initialize_path)[0] if self._INITIALIZE in nodes else None
|
||||
initialize = (self.get_node(self.initialize_path) or [None])[0] if self._INITIALIZE in nodes else None
|
||||
|
||||
# get list of members
|
||||
members = self.load_members() if self._MEMBERS[:-1] in nodes else []
|
||||
|
||||
Reference in New Issue
Block a user