Flake 8 lint
This commit is contained in:
parent
7400272778
commit
52248bea1f
7 changed files with 7 additions and 11 deletions
|
@ -1,6 +1,5 @@
|
|||
from helpers.state_manager import StateManager
|
||||
from helpers.os_environment import isWindows, resolve_external_file_path
|
||||
from typing import List
|
||||
from setproctitle import setproctitle
|
||||
from multiprocessing import current_process, Queue
|
||||
from time import sleep
|
||||
|
@ -72,7 +71,7 @@ class FileManager:
|
|||
command = split[2]
|
||||
# rest of message = split[3]
|
||||
|
||||
self.logger.log.debug("Got command {} for channel {}".format(command,channel))
|
||||
self.logger.log.debug("Got command {} for channel {}".format(command, channel))
|
||||
|
||||
# If we have requested a new show plan, empty the music-tmp directory for the previous show.
|
||||
if command == "GETPLAN":
|
||||
|
@ -158,8 +157,6 @@ class FileManager:
|
|||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
except Exception as e:
|
||||
self.logger.log.exception(
|
||||
"Received unexpected exception: {}".format(e))
|
||||
|
|
|
@ -37,7 +37,7 @@ class LoggingManager:
|
|||
return
|
||||
|
||||
# Enable debug by default
|
||||
if (debug == None and package.BETA):
|
||||
if (debug is None and package.BETA):
|
||||
debug = True
|
||||
|
||||
self.logger.setLevel(logging.DEBUG if debug else logging.INFO)
|
||||
|
|
|
@ -35,7 +35,7 @@ def startServer(notifications=False):
|
|||
|
||||
if server and server.is_alive():
|
||||
server.terminate()
|
||||
server.join(timeout=20) # If we somehow get stuck stopping BAPSicle let it die.
|
||||
server.join(timeout=20) # If we somehow get stuck stopping BAPSicle let it die.
|
||||
|
||||
# Catch the handler being killed externally.
|
||||
except Exception as e:
|
||||
|
|
|
@ -931,7 +931,7 @@ class Player:
|
|||
|
||||
def _retAll(self, msg):
|
||||
if self.out_q:
|
||||
self.out_q.put("{}:ALL:{}".format(self.state.get()["channel"],msg))
|
||||
self.out_q.put("{}:ALL:{}".format(self.state.get()["channel"], msg))
|
||||
|
||||
def _retMsg(
|
||||
self, msg: Any, okay_str: bool = False, custom_prefix: Optional[str] = None
|
||||
|
@ -1108,7 +1108,7 @@ class Player:
|
|||
|
||||
# We got a message.
|
||||
|
||||
## Check if we're successfully loaded
|
||||
# Check if we're successfully loaded
|
||||
# This is here so that we can check often, but not every single loop
|
||||
# Only when user gives input.
|
||||
self._checkIsLoaded()
|
||||
|
|
|
@ -27,7 +27,7 @@ class PlayerHandler:
|
|||
q_msg = channel_from_q.get_nowait()
|
||||
if not isinstance(q_msg, str):
|
||||
continue
|
||||
split = q_msg.split(":",1)
|
||||
split = q_msg.split(":", 1)
|
||||
message = split[1]
|
||||
source = message.split(":")[0]
|
||||
command = message.split(":")[1]
|
||||
|
|
|
@ -473,7 +473,7 @@ def status(channel: int):
|
|||
while retries < 40:
|
||||
try:
|
||||
message = player_from_q.get_nowait()
|
||||
split = message.split(":",1)
|
||||
split = message.split(":", 1)
|
||||
channel = int(split[0])
|
||||
response = split[1]
|
||||
if response.startswith("UI:STATUS:"):
|
||||
|
|
|
@ -255,7 +255,6 @@ class WebsocketServer:
|
|||
"Exception trying to send to websocket:", e
|
||||
)
|
||||
|
||||
|
||||
self.quit()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue