mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-11 08:47:23 +08:00
fix: 天气查询失败的问题
This commit is contained in:
parent
016fe3ef72
commit
c4db4dc6a6
@ -27,14 +27,15 @@ def update_liteyuki() -> tuple[bool, str]:
|
|||||||
logs = ""
|
logs = ""
|
||||||
# 对每个远程仓库进行更新
|
# 对每个远程仓库进行更新
|
||||||
for remote_url in remote_urls:
|
for remote_url in remote_urls:
|
||||||
logs += f"\nremote: {remote_url}"
|
try:
|
||||||
repo.remotes.origin.set_url(remote_url)
|
logs += f"\nremote: {remote_url}"
|
||||||
repo.remotes.origin.pull()
|
repo.remotes.origin.set_url(remote_url)
|
||||||
diffs = repo.head.commit.diff("origin/main")
|
repo.remotes.origin.pull()
|
||||||
|
diffs = repo.head.commit.diff("origin/main")
|
||||||
for diff in diffs.iter_change_type('M'):
|
for diff in diffs.iter_change_type('M'):
|
||||||
logs += f"\n{diff.a_path}"
|
logs += f"\n{diff.a_path}"
|
||||||
return True, logs
|
return True, logs
|
||||||
|
except:
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
return False, "Nothing Changed"
|
return False, "Nothing Changed"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user