forked from Hay1tsme/artemis
print cleanup, remove unused mucha options
This commit is contained in:
parent
a97509bb43
commit
6fa0175baa
@ -65,7 +65,7 @@ class AllnetServlet:
|
|||||||
self.uri_registry[code] = (uri, host)
|
self.uri_registry[code] = (uri, host)
|
||||||
|
|
||||||
self.logger.info(
|
self.logger.info(
|
||||||
f"Allnet serving {len(self.uri_registry)} games on port {core_cfg.allnet.port}"
|
f"Serving {len(self.uri_registry)} game codes port {core_cfg.allnet.port}"
|
||||||
)
|
)
|
||||||
|
|
||||||
def handle_poweron(self, request: Request, _: Dict):
|
def handle_poweron(self, request: Request, _: Dict):
|
||||||
|
@ -267,24 +267,6 @@ class MuchaConfig:
|
|||||||
self.__config, "core", "mucha", "hostname", default="localhost"
|
self.__config, "core", "mucha", "hostname", default="localhost"
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
|
||||||
def port(self) -> int:
|
|
||||||
return CoreConfig.get_config_field(
|
|
||||||
self.__config, "core", "mucha", "port", default=8444
|
|
||||||
)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def ssl_cert(self) -> str:
|
|
||||||
return CoreConfig.get_config_field(
|
|
||||||
self.__config, "core", "mucha", "ssl_cert", default="cert/server.pem"
|
|
||||||
)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def signing_key(self) -> str:
|
|
||||||
return CoreConfig.get_config_field(
|
|
||||||
self.__config, "core", "mucha", "signing_key", default="cert/billing.key"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class CoreConfig(dict):
|
class CoreConfig(dict):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
@ -47,7 +47,7 @@ class MuchaServlet:
|
|||||||
self.mucha_registry.append(game_cd)
|
self.mucha_registry.append(game_cd)
|
||||||
|
|
||||||
self.logger.info(
|
self.logger.info(
|
||||||
f"Serving {len(self.mucha_registry)} games on port {self.config.mucha.port}"
|
f"Serving {len(self.mucha_registry)} games"
|
||||||
)
|
)
|
||||||
|
|
||||||
def handle_boardauth(self, request: Request, _: Dict) -> bytes:
|
def handle_boardauth(self, request: Request, _: Dict) -> bytes:
|
||||||
@ -73,7 +73,7 @@ class MuchaServlet:
|
|||||||
# TODO: Decrypt S/N
|
# TODO: Decrypt S/N
|
||||||
|
|
||||||
resp = MuchaAuthResponse(
|
resp = MuchaAuthResponse(
|
||||||
f"{self.config.mucha.hostname}{':' + str(self.config.mucha.port) if self.config.server.is_develop else ''}"
|
f"{self.config.mucha.hostname}{':' + str(self.config.allnet.port) if self.config.server.is_develop else ''}"
|
||||||
)
|
)
|
||||||
|
|
||||||
self.logger.debug(f"Mucha response {vars(resp)}")
|
self.logger.debug(f"Mucha response {vars(resp)}")
|
||||||
|
@ -68,7 +68,7 @@ class TitleServlet:
|
|||||||
self.logger.error(f"{folder} missing game_code or index in __init__.py")
|
self.logger.error(f"{folder} missing game_code or index in __init__.py")
|
||||||
|
|
||||||
self.logger.info(
|
self.logger.info(
|
||||||
f"Serving {len(self.title_registry)} game codes on port {core_cfg.title.port}"
|
f"Serving {len(self.title_registry)} game codes {'on port ' + str(core_cfg.title.port) if core_cfg.title.port > 0 else ''}"
|
||||||
)
|
)
|
||||||
|
|
||||||
def render_GET(self, request: Request, endpoints: dict) -> bytes:
|
def render_GET(self, request: Request, endpoints: dict) -> bytes:
|
||||||
|
@ -48,6 +48,3 @@ mucha:
|
|||||||
enable: False
|
enable: False
|
||||||
hostname: "localhost"
|
hostname: "localhost"
|
||||||
loglevel: "info"
|
loglevel: "info"
|
||||||
port: 8444
|
|
||||||
ssl_key: "cert/server.key"
|
|
||||||
ssl_cert: "cert/server.pem"
|
|
||||||
|
@ -98,11 +98,11 @@ class CxbServlet(resource.Resource):
|
|||||||
).listen(server.Site(CxbServlet(self.core_cfg, self.cfg_dir)))
|
).listen(server.Site(CxbServlet(self.core_cfg, self.cfg_dir)))
|
||||||
|
|
||||||
self.logger.info(
|
self.logger.info(
|
||||||
f"Crossbeats title server ready on port {self.game_cfg.server.port} & {self.game_cfg.server.port_secure}"
|
f"Ready on ports {self.game_cfg.server.port} & {self.game_cfg.server.port_secure}"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self.logger.info(
|
self.logger.info(
|
||||||
f"Crossbeats title server ready on port {self.game_cfg.server.port}"
|
f"Ready on port {self.game_cfg.server.port}"
|
||||||
)
|
)
|
||||||
|
|
||||||
def render_POST(self, request: Request):
|
def render_POST(self, request: Request):
|
||||||
|
Loading…
Reference in New Issue
Block a user