Update login.py

优化代码报错,点图相关问题
This commit is contained in:
zhao-zg 2024-08-29 16:41:10 +08:00 committed by GitHub
parent 8a1ebb5c3a
commit bc2f82d244
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -203,10 +203,12 @@ async def loginPhone(chromium_path, workList, uid, headless):
await asyncio.sleep(1)
except Exception as e:
workList[uid].msg = "服务器异常退出"
workList[uid].status = "error"
print("异常退出")
print(e)
await browser.close()
await deleteSession(workList, uid)
await deleteSessionDelay(workList, uid)
raise e
print("任务完成退出")
@ -404,7 +406,7 @@ async def loginPassword(chromium_path, workList, uid, headless):
print("异常退出")
print(e)
await browser.close()
await deleteSession(workList, uid)
await deleteSessionDelay(workList, uid)
raise e
print("任务完成退出")