Skip to content

Commit

Permalink
fix: 尝试修复获取对话记录失败的问题 close #362
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxi committed Jan 16, 2025
1 parent a317337 commit e9253fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,5 @@ setting.json
.DS_Store
cache
tmp/
xiaomusic.log.txt
xiaomusic.log.txt*
node_modules
3 changes: 3 additions & 0 deletions xiaomusic/xiaomusic.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@ async def get_latest_ask_from_xiaoai(self, session, device_id):
# 检查响应状态码
if r.status != 200:
self.log.warning(f"Request failed with status {r.status}")
# fix #362
if i == 2 and r.status == 401:
await self.init_all_data(self.session)
continue

except asyncio.CancelledError:
Expand Down

0 comments on commit e9253fe

Please sign in to comment.