python: Fix API break in hook_timer()

Closes #2691
This commit is contained in:
Patrick 2022-04-15 13:43:22 -05:00 committed by GitHub
parent 133f628064
commit dd167b4c83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -284,7 +284,7 @@ def _on_server_attrs_hook(word, word_eol, attrs, userdata):
@ffi.def_extern()
def _on_timer_hook(userdata):
hook = ffi.from_handle(userdata)
if hook.callback(hook.userdata) is True:
if hook.callback(hook.userdata) == True:
return 1
hook.is_unload = True # Don't unhook