Last few pep issues.
This commit is contained in:
parent
612478b777
commit
023cafad90
7 changed files with 29 additions and 26 deletions
|
@ -9,6 +9,7 @@ from helpers.logging_manager import LoggingManager
|
|||
from helpers.state_manager import StateManager
|
||||
from controllers.controller import Controller
|
||||
|
||||
|
||||
class MattchBox(Controller):
|
||||
ser: Optional[serial.Serial]
|
||||
port: Optional[str]
|
||||
|
|
|
@ -42,6 +42,7 @@ from plan import PlanItem
|
|||
# TODO ENUM
|
||||
VALID_MESSAGE_SOURCES = ["WEBSOCKET", "UI", "CONTROLLER", "TEST", "ALL"]
|
||||
|
||||
|
||||
class Player:
|
||||
out_q: multiprocessing.Queue
|
||||
last_msg: str
|
||||
|
|
|
@ -5,6 +5,7 @@ from os import _exit
|
|||
|
||||
from helpers.logging_manager import LoggingManager
|
||||
|
||||
|
||||
class PlayerHandler:
|
||||
logger: LoggingManager
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ from os import _exit
|
|||
from helpers.logging_manager import LoggingManager
|
||||
from websockets.server import Serve
|
||||
|
||||
|
||||
class WebsocketServer:
|
||||
|
||||
threads = Future
|
||||
|
@ -52,7 +53,7 @@ class WebsocketServer:
|
|||
print("Deleting websocket server")
|
||||
self.quit()
|
||||
|
||||
async def websocket_handler(self, websocket, _):
|
||||
async def websocket_handler(self, websocket, path):
|
||||
self.baps_clients.add(websocket)
|
||||
await websocket.send(
|
||||
json.dumps({"message": "Hello", "serverName": self.server_name})
|
||||
|
@ -84,7 +85,6 @@ class WebsocketServer:
|
|||
self.logger.log.error(
|
||||
"Client Disconncted {}, {}".format(websocket, e))
|
||||
|
||||
# TODO: Proper Logging
|
||||
except Exception as e:
|
||||
self.logger.log.exception(
|
||||
"Exception handling messages from Websocket.\n{}".format(e)
|
||||
|
|
Loading…
Reference in a new issue