mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Handle AttributeError in etcd.py (#1801)
When the__del__() method is executed the python interpreter already unloaded some of the modules that are still used down the http.clear() method. The only we could do in this case - silence some exceptions like ReferenceError, TypeError, AttributeError. Close https://github.com/zalando/patroni/issues/1785
This commit is contained in:
+1
-1
@@ -404,7 +404,7 @@ class EtcdClient(AbstractEtcdClientWithFailover):
|
||||
if self.http is not None:
|
||||
try:
|
||||
self.http.clear()
|
||||
except (ReferenceError, TypeError):
|
||||
except (ReferenceError, TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
def _prepare_get_members(self, etcd_nodes):
|
||||
|
||||
Reference in New Issue
Block a user