Unverified Kaydet (Commit) 5407d1c1 authored tarafından BTaskaya's avatar BTaskaya Kaydeden (comit) GitHub

Update catlizor.py

üst 96c3b3f0
......@@ -20,9 +20,7 @@ def get_hooks(cond, hooks: Tuple[Sequence[Hook], ...]):
def compare_hook(hook):
return getattr(HookConditions, cond) in getattr(hook, HOOK_SIGN)
res = sum(getattr(hook, HOOK_SPEC) for hook in filter(compare_hook, hooks))
if res == 0:
res = HookSpec()
res = sum(getattr(hook, HOOK_SPEC) for hook in filter(compare_hook, hooks) or HookSpec()
return res
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment