call_for_result should have a max of 1, not 0
This commit is contained in:
parent
820523a28d
commit
bfdb4a88da
1 changed files with 1 additions and 1 deletions
|
@ -151,7 +151,7 @@ class EventHook(object):
|
||||||
return child
|
return child
|
||||||
|
|
||||||
def call_for_result(self, default=None, **kwargs):
|
def call_for_result(self, default=None, **kwargs):
|
||||||
results = self.call_limited(0, **kwargs)
|
results = self.call_limited(1, **kwargs)
|
||||||
return default if not len(results) else results[0]
|
return default if not len(results) else results[0]
|
||||||
def assure_call(self, **kwargs):
|
def assure_call(self, **kwargs):
|
||||||
if not self._stored_events == None:
|
if not self._stored_events == None:
|
||||||
|
|
Loading…
Reference in a new issue