mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-23 21:25:12 +00:00
Fix some IDE warnings
This commit is contained in:
@@ -143,7 +143,7 @@ class APIAlertsStreamHandler(tornado_eventsource.handler.EventSourceHandler):
|
||||
if self._alert_queue not in self._sse_alert_queues:
|
||||
logging.error("Web server cleared up a queue of an active connection!")
|
||||
self.close()
|
||||
except:
|
||||
except Exception as e:
|
||||
logging.warning("Exception in SSE callback, connection will be closed: %s", e, exc_info=True)
|
||||
self.close()
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import json
|
||||
from datetime import datetime
|
||||
|
||||
import pytz
|
||||
import tornado
|
||||
|
||||
from core.prometheus_metrics_handler import api_requests_counter
|
||||
from core.utils import serialize_everything
|
||||
|
||||
|
||||
class APISolarConditionsHandler(tornado.web.RequestHandler):
|
||||
|
||||
@@ -145,7 +145,7 @@ class APISpotsStreamHandler(tornado_eventsource.handler.EventSourceHandler):
|
||||
if self._spot_queue not in self._sse_spot_queues:
|
||||
logging.error("Web server cleared up a queue of an active connection!")
|
||||
self.close()
|
||||
except:
|
||||
except Exception as e:
|
||||
logging.warning("Exception in SSE callback, connection will be closed: %s", e, exc_info=True)
|
||||
self.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user