From 7aaea7c38de57384c6733d38f39bb05c8fe67fa8 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Wed, 10 Jan 2024 17:30:33 -0600 Subject: [PATCH] Avoid passing unused values to method --- swagger_server/handlers/connection_handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/swagger_server/handlers/connection_handler.py b/swagger_server/handlers/connection_handler.py index ab6a06e8..d918b59a 100644 --- a/swagger_server/handlers/connection_handler.py +++ b/swagger_server/handlers/connection_handler.py @@ -22,8 +22,7 @@ def remove_connection(self, connection): # call pce to remove connection pass - def _send_breakdown_to_lc(self, temanager, connection, solution): - breakdown = temanager.generate_connection_breakdown(solution) + def _send_breakdown_to_lc(self, breakdown): logger.debug(f"-- BREAKDOWN: {json.dumps(breakdown)}") if breakdown is None: @@ -158,7 +157,8 @@ def place_connection(self, connection_request: dict) -> Tuple[str, int]: if solution is None or solution.connection_map is None: return "Could not solve the request", 400 - self._send_breakdown_to_lc(temanager, connection, solution) + breakdown = temanager.generate_connection_breakdown(solution) + self._send_breakdown_to_lc(breakdown) def handle_link_failure(self, msg_json): logger.debug("---Handling connections that contain failed link.---")