From e81820854340e5694aee68eb945595d89c66eecc Mon Sep 17 00:00:00 2001 From: RF-Tar-Railt Date: Sat, 14 Dec 2024 17:18:03 +0800 Subject: [PATCH] feat(ver): v0.1.4 release --- pyproject.toml | 2 +- src/nekobox/__init__.py | 2 +- src/nekobox/main.py | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 895f73f..1f8eb5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nekobox" -version = "0.1.3" +version = "0.1.4" description = "A Satori backend powered by lagrange-python" authors = [ {name = "wyapx", email = "admin@nullcat.cn"}, diff --git a/src/nekobox/__init__.py b/src/nekobox/__init__.py index 93a12a5..bb633ea 100644 --- a/src/nekobox/__init__.py +++ b/src/nekobox/__init__.py @@ -1,3 +1,3 @@ from .main import NekoBoxAdapter as NekoBoxAdapter -__version__ = "0.1.2" +__version__ = "0.1.4" diff --git a/src/nekobox/main.py b/src/nekobox/main.py index b8ab1c2..d53f4c3 100644 --- a/src/nekobox/main.py +++ b/src/nekobox/main.py @@ -203,6 +203,8 @@ async def login_get(request: Request): logins = await self.get_logins() return logins[0] + patch_logging(self.log_level) + async with self.stage("preparing"): client.connect() success = True @@ -216,14 +218,12 @@ async def login_get(request: Request): success = await client.easy_login() else: success = False - - patch_logging(self.log_level) - if not success: - if not await self.qrlogin(client): - logger.error("login error") - else: - await self.client.register() - success = True + if not success: + if not await self.qrlogin(client): + logger.error("login error") + else: + await self.client.register() + success = True async with self.stage("blocking"): if success: