fix: replace 9 bare excepts with except Exception

This commit is contained in:
haosenwang1018
2026-02-25 04:23:42 +00:00
parent 85235fb045
commit 632c6a9838
6 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -220,7 +220,7 @@ async def get_db(request: Request):
logger.error(f"❌ 关闭会话时出错 [User:{user_id}][ID:{session_id}]: {str(e)}", exc_info=True)
try:
await session.close()
except:
except Exception:
pass
async def init_db(user_id: str = None):