From ff6ef16b89a96609136bff5bc4c28b638004fd6f Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Sat, 4 Mar 2023 22:52:17 -0500 Subject: [PATCH] mucha: small cleanup with a oneliner --- core/mucha.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/core/mucha.py b/core/mucha.py index bbfe045..b85b535 100644 --- a/core/mucha.py +++ b/core/mucha.py @@ -56,11 +56,8 @@ class MuchaServlet: return b"" # TODO: Figure out why the S/N is the way it is. - - if self.config.server.is_develop: - resp = MuchaAuthResponse(mucha_url=f"{self.config.mucha.hostname}:{self.config.mucha.port}") - else: - resp = MuchaAuthResponse(mucha_url=f"{self.config.mucha.hostname}") + + resp = MuchaAuthResponse(f"{self.config.mucha.hostname}{':' + self.config.mucha.port if self.config.server.is_develop else ''}") self.logger.debug(f"Mucha response {vars(resp)}") @@ -80,10 +77,7 @@ class MuchaServlet: self.logger.warn(f"Unknown gameCd {req.gameCd}") return b"" - if self.config.server.is_develop: - resp = MuchaUpdateResponse(req.gameVer, f"{self.config.mucha.hostname}:{self.config.mucha.port}") - else: - resp = MuchaUpdateResponse(req.gameVer, f"{self.config.mucha.hostname}") + resp = MuchaUpdateResponse(req.gameVer, f"{self.config.mucha.hostname}{':' + self.config.mucha.port if self.config.server.is_develop else ''}") self.logger.debug(f"Mucha response {vars(resp)}")