From ed62e260a7af5b8da38a1711666c37aa49288f4e Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Thu, 31 Jul 2025 18:29:18 -0600 Subject: [PATCH] fix: Import aiohttp.web submodule directly Co-authored-by: aider (gemini/gemini-2.5-pro-preview-05-06) --- server.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index ac2e2ea..b334dc4 100644 --- a/server.py +++ b/server.py @@ -1,5 +1,6 @@ import asyncio import aiohttp +from aiohttp import web import logging import os import io @@ -86,7 +87,7 @@ async def monitor_garage_door(app): # --- Web Server --- async def handle_root(request): """Handler for the root GET request.""" - return aiohttp.web.Response(text="hello world") + return web.Response(text="hello world") async def on_startup(app): """Actions to perform on application startup.""" @@ -120,11 +121,11 @@ async def on_cleanup(app): logging.info("Cleanup complete.") def main(): - app = aiohttp.web.Application() + app = web.Application() app.router.add_get('/', handle_root) app.on_startup.append(on_startup) app.on_cleanup.append(on_cleanup) - aiohttp.web.run_app(app) + web.run_app(app) if __name__ == '__main__': if not os.path.exists(MODEL_PATH):