diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2022-10-24 22:29:03 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:52 +0100 |
commit | 4b004a356aec12eb59fb4c5a208c21d3817ef9d7 (patch) | |
tree | 41ab637631d19f890afae937e42f03e8a339c1cd /slack/weechat_http.py | |
parent | ee9d976ff8d8910c091d1554dfa62ab28ad67509 (diff) | |
download | wee-slack-4b004a356aec12eb59fb4c5a208c21d3817ef9d7.tar.gz |
Add callbacks to global scope
Diffstat (limited to 'slack/weechat_http.py')
-rw-r--r-- | slack/weechat_http.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/slack/weechat_http.py b/slack/weechat_http.py index df7943d..61e6c38 100644 --- a/slack/weechat_http.py +++ b/slack/weechat_http.py @@ -5,9 +5,11 @@ import resource from io import StringIO from typing import Dict +import globals as G import weechat from log import LogLevel, log from task import FutureProcess, sleep, weechat_task_cb +from util import get_callback_name class HttpError(Exception): @@ -34,7 +36,7 @@ async def hook_process_hashtable(command: str, options: Dict[str, str], timeout: while available_file_descriptors() < 10: await sleep(10) weechat.hook_process_hashtable( - command, options, timeout, weechat_task_cb.__name__, future.id + command, options, timeout, get_callback_name(weechat_task_cb), future.id ) stdout = StringIO() |