[hook] delete_doc is a staticmethod => remove `self` argument

authorSamuel Trégouët <samuel.tregouet@logilab.fr>
changeset46ca26089efb
branchdefault
phasepublic
hiddenno
parent revision#1c4e7b35e611 [ccplugin] do not crash if an entity failed to serialize
child revision#3f5b5b287d5f [pkg] 0.5.2
files modified by this revision
cubicweb_elasticsearch/hooks.py
# HG changeset patch
# User Samuel Trégouët <samuel.tregouet@logilab.fr>
# Date 1493977634 -7200
# Fri May 05 11:47:14 2017 +0200
# Node ID 46ca26089efb0df1ed6114f645e3540033b5e7f9
# Parent 1c4e7b35e611717b8167756ac269d365500c8597
[hook] delete_doc is a staticmethod => remove `self` argument

diff --git a/cubicweb_elasticsearch/hooks.py b/cubicweb_elasticsearch/hooks.py
@@ -64,11 +64,11 @@
1 
2 
3  class IndexEsOperation(hook.DataOperationMixIn, hook.Operation):
4 
5      @staticmethod
6 -    def delete_doc(self, es, **kwargs):
7 +    def delete_doc(es, **kwargs):
8          try:
9              # TODO option for async ?
10              es.delete(**kwargs)
11          except (ConnectionError, ProtocolError):
12              log.warning('Failed to delete in hook, could not connect to ES')