pull priority out of kwargs in _hook

This commit is contained in:
jesopo 2019-07-30 15:24:13 +01:00
parent 27a6078f20
commit dd8b276b35

View file

@ -90,6 +90,10 @@ class Events(object):
self._hook(func, priority, list(kwargs.items()))
def _hook(self, func: CALLBACK_TYPE, priority: int = DEFAULT_PRIORITY,
kwargs: typing.List[typing.Tuple[str, typing.Any]] = []):
for key, value in kwargs:
if key == "priority":
priority = value
break
self._root._hook(self._path, func, self._context, priority, kwargs)
def call(self, **kwargs):