aboutsummaryrefslogtreecommitdiffstats
path: root/slack/register.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-01-29 23:49:48 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commitcd247f4e3abf0ce22df73448562e3d30eea19e14 (patch)
tree78f61ca1b9b2a9a2b64fcf0c6760df0411c91ada /slack/register.py
parentc643c84a253b3e98f5e0a1fc19855e948c84fc99 (diff)
downloadwee-slack-cd247f4e3abf0ce22df73448562e3d30eea19e14.tar.gz
Make ws and hook internal and instantiate them to None
Diffstat (limited to 'slack/register.py')
-rw-r--r--slack/register.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/slack/register.py b/slack/register.py
index 2994e7f..38a9a35 100644
--- a/slack/register.py
+++ b/slack/register.py
@@ -1,9 +1,6 @@
from __future__ import annotations
-import socket
-
import weechat
-from websocket import WebSocketConnectionClosedException
from slack.commands import register_commands
from slack.config import SlackConfig
@@ -75,13 +72,7 @@ def modifier_input_text_display_with_cursor_cb(
def ws_ping_cb(data: str, remaining_calls: int) -> int:
for workspace in shared.workspaces.values():
if workspace.is_connected:
- try:
- workspace.ws.ping()
- # workspace.last_ping_time = time.time()
- except (WebSocketConnectionClosedException, socket.error) as e:
- # TODO: Handle error
- # handle_socket_error(e, team, "ping")
- print(e)
+ workspace.ping()
return weechat.WEECHAT_RC_OK