From 7d0be62da863d7cc633da43a5fd87370d63566f7 Mon Sep 17 00:00:00 2001 From: Mark Paronyan Date: Wed, 30 Sep 2026 20:45:44 +0300 Subject: [PATCH] style: drop redundant utf-8 encode arguments --- gns3server/api/routes/controller/controller.py | 2 +- gns3server/api/routes/controller/projects.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/api/routes/controller/controller.py b/gns3server/api/routes/controller/controller.py index 3afd00a77..bd6502135 100644 --- a/gns3server/api/routes/controller/controller.py +++ b/gns3server/api/routes/controller/controller.py @@ -272,7 +272,7 @@ async def controller_http_notifications(request: Request) -> StreamingResponse: with Controller.instance().notification.controller_queue() as queue: while not app.state.exiting: msg = await queue.get_json(5) - yield f"{msg}\n".encode("utf-8") + yield f"{msg}\n".encode() finally: log.info(f"Client {client} has disconnected from controller HTTP notification stream") diff --git a/gns3server/api/routes/controller/projects.py b/gns3server/api/routes/controller/projects.py index 378a276b8..83dfcff8e 100644 --- a/gns3server/api/routes/controller/projects.py +++ b/gns3server/api/routes/controller/projects.py @@ -543,7 +543,7 @@ async def project_http_notifications(project_id: UUID) -> StreamingResponse: with controller.notification.project_queue(project.id) as queue: while not app.state.exiting: msg = await queue.get_json(5) - yield f"{msg}\n".encode("utf-8") + yield f"{msg}\n".encode() finally: log.info(f"Client has disconnected from notification for project ID '{project.id}' (HTTP stream method)") if project.auto_close: