simplify init code
This commit is contained in:
@@ -173,13 +173,14 @@ class Elasticsearch(object):
|
|||||||
|
|
||||||
# namespaced clients for compatibility with API names
|
# namespaced clients for compatibility with API names
|
||||||
# use weakref to make GC's work a little easier
|
# use weakref to make GC's work a little easier
|
||||||
self.indices = IndicesClient(weakref.proxy(self))
|
client = weakref.proxy(self)
|
||||||
self.ingest = IngestClient(weakref.proxy(self))
|
self.indices = IndicesClient(client)
|
||||||
self.cluster = ClusterClient(weakref.proxy(self))
|
self.ingest = IngestClient(client)
|
||||||
self.cat = CatClient(weakref.proxy(self))
|
self.cluster = ClusterClient(client)
|
||||||
self.nodes = NodesClient(weakref.proxy(self))
|
self.cat = CatClient(client)
|
||||||
self.snapshot = SnapshotClient(weakref.proxy(self))
|
self.nodes = NodesClient(client)
|
||||||
self.tasks = TasksClient(weakref.proxy(self))
|
self.snapshot = SnapshotClient(client)
|
||||||
|
self.tasks = TasksClient(client)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user