mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
ruff fixes
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import logging
|
||||
|
||||
import tornado
|
||||
from tornado.httpclient import AsyncHTTPClient
|
||||
from tornado.httputil import HTTPHeaders
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
_LEGACY_PARAM_TO_HEADER_MAP = {
|
||||
"qrz_username": "X-QRZ-Username",
|
||||
"qrz_password": "X-QRZ-Password",
|
||||
@@ -41,6 +45,7 @@ class V1RedirectHandler(tornado.web.RequestHandler):
|
||||
request_timeout=10.0,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.exception("Exception when proxying legacy v1 API request")
|
||||
raise tornado.web.HTTPError(502, reason=str(e))
|
||||
|
||||
self.set_status(response.code, response.reason)
|
||||
|
||||
@@ -42,5 +42,5 @@ class SSEBroadcaster:
|
||||
handler.callback(value)
|
||||
except Exception:
|
||||
# Connection probably dropped, ignore and de-register the handler to stop getting future items.
|
||||
logger.debug("Failed to push to an SSE client; dropping it")
|
||||
logger.debug("Failed to push to an SSE client; dropping it", exc_info=True)
|
||||
self.unregister(handler)
|
||||
|
||||
Reference in New Issue
Block a user