mirror of
https://github.com/frozenpandaman/s3s.git
synced 2026-09-12 20:45:17 -05:00
Fix uninitialized variables in posting battle result with empty overview data
This commit is contained in:
2
s3s.py
2
s3s.py
@@ -679,6 +679,7 @@ def prepare_battle_result(battle, ismonitoring, isblackout, overview_data=None):
|
||||
overview_data = None
|
||||
print("Failed to get recent Anarchy Battles. Proceeding without information on current rank.")
|
||||
if overview_data is not None:
|
||||
ranked_list = []
|
||||
for screen in overview_data:
|
||||
if "bankaraBattleHistories" in screen["data"]:
|
||||
ranked_list = screen["data"]["bankaraBattleHistories"]["historyGroups"]["nodes"]
|
||||
@@ -766,6 +767,7 @@ def prepare_battle_result(battle, ismonitoring, isblackout, overview_data=None):
|
||||
overview_data = None
|
||||
print("Failed to get recent X Battles. Proceeding without some information on X Power.")
|
||||
if overview_data is not None:
|
||||
x_list = []
|
||||
for screen in overview_data:
|
||||
if "xBattleHistories" in screen["data"]:
|
||||
x_list = screen["data"]["xBattleHistories"]["historyGroups"]["nodes"]
|
||||
|
||||
Reference in New Issue
Block a user