Add try catch around troublesome logging statement

This commit is contained in:
Andrew 2022-01-25 21:11:06 -05:00
parent eeaceb61fc
commit 9b03163c6b

View File

@ -77,8 +77,10 @@ class WebSocketHelper:
def broadcast_with_fn(self, filter_fn, event_type: str, data): def broadcast_with_fn(self, filter_fn, event_type: str, data):
clients = list(filter(filter_fn, self.clients)) clients = list(filter(filter_fn, self.clients))
try:
logger.debug(f"Sending to {len(clients)} out of {len(self.clients)} clients: {json.dumps({'event': event_type, 'data': data})}") logger.debug(f"Sending to {len(clients)} out of {len(self.clients)} clients: {json.dumps({'event': event_type, 'data': data})}")
except:
logger.debug("Our logging statement actually just farted line 83 websocket helper.")
for client in clients: for client in clients:
try: try: