From b323dc0e64ae70a978208c4d636cbc3bf7b069fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Thu, 17 Nov 2022 19:13:12 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20`TypeError`=20exception=20?= =?UTF-8?q?in=20`DailyRewardClient`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/patch/genshin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/patch/genshin.py b/utils/patch/genshin.py index 9e6c9ab..9e3ac1e 100644 --- a/utils/patch/genshin.py +++ b/utils/patch/genshin.py @@ -224,10 +224,10 @@ class DailyRewardClient: headers["x-rpc-validate"] = validate headers["x-rpc-seccode"] = f"{validate}|jordan" - kwargs.pop("challenge", None) - kwargs.pop("validate", None) - else: raise TypeError(f"{self.region!r} is not a valid region.") + kwargs.pop("challenge", None) + kwargs.pop("validate", None) + return await self.request(url, method=method, params=params, headers=headers, **kwargs)