From dd9a9c5b0496920231a819118bc0f2a682913fee Mon Sep 17 00:00:00 2001 From: Kailigithub <100wkl@163.com> Date: Sat, 9 May 2026 15:00:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=B8=85=E7=90=86?= =?UTF-8?q?=20TMWebDriver=20=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=EF=BC=8C=E4=BF=AE=E6=AD=A3=E8=A3=B8=20except=20?= =?UTF-8?q?=E8=AF=AD=E6=B3=95=20(#311)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Kailigithub --- TMWebDriver.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/TMWebDriver.py b/TMWebDriver.py index 6a4a704a..54f31685 100644 --- a/TMWebDriver.py +++ b/TMWebDriver.py @@ -1,9 +1,8 @@ import json, threading, time, uuid, queue, socket, requests, traceback -from typing import Dict, Any, Optional, List -from simple_websocket_server import WebSocketServer, WebSocket -from bs4 import BeautifulSoup -import bottle, random -from bottle import route, template, request, response +from typing import Any +from simple_websocket_server import WebSocketServer, WebSocket +import bottle +from bottle import request class Session: def __init__(self, session_id, info, client=None): @@ -69,7 +68,7 @@ class TMWebDriver: try: msg = msgQ.get(timeout=0.2) try: self.acks[json.loads(msg).get('id','')] = True - except: traceback.print_exc() + except Exception: traceback.print_exc() return msg except queue.Empty: continue return json.dumps({"id": "", "ret": "next long-poll"})