Skip to content

Commit

Permalink
fix 115
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Nov 17, 2024
1 parent 2dfb089 commit d7c2607
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/modules/filemanager/storages/u115.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def generate_qrcode(self) -> Optional[Tuple[dict, str]]:
"""
生成二维码
"""
if not self.__init_cloud():
return None
try:
resp = self.client.login_qrcode_token()
self.session_info = resp["data"]
Expand All @@ -89,9 +91,9 @@ def check_login(self) -> Optional[Tuple[dict, str]]:
"""
二维码登录确认
"""
if not self.session_info:
return {}, "请先生成二维码!"
try:
if not self.session_info:
return {}, "请先生成二维码!"
resp = self.client.login_qrcode_scan_status(self.session_info)
match resp["data"].get("status"):
case 0:
Expand Down

0 comments on commit d7c2607

Please sign in to comment.