Skip to content

Commit

Permalink
Don't shadow json lib name from outer scope
Browse files Browse the repository at this point in the history
  • Loading branch information
bakert authored and mergify[bot] committed Aug 27, 2023
1 parent 0763d0e commit d04beb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions magic/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ async def legal_cards_async(season: Optional[str] = None) -> List[str]:

async def mtgo_status() -> str:
try:
json = await fetch_tools.fetch_json_async('https://census.daybreakgames.com/s:example/get/global/game_server_status?game_code=mtgo&c:limit=1000')
last_reported_state = json['game_server_status_list'][0]['last_reported_state']
data = await fetch_tools.fetch_json_async('https://census.daybreakgames.com/s:example/get/global/game_server_status?game_code=mtgo&c:limit=1000')
last_reported_state = data['game_server_status_list'][0]['last_reported_state']
return 'UP' if last_reported_state in ['high', 'medium', 'low'] else last_reported_state
except (FetchException, json.decoder.JSONDecodeError):
return 'UNKNOWN'
Expand Down

0 comments on commit d04beb8

Please sign in to comment.