Skip to content

Commit

Permalink
Simplify JSON request code in updater
Browse files Browse the repository at this point in the history
  • Loading branch information
dwhinham committed Mar 29, 2022
1 parent b367548 commit 6382d79
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/mt32pi_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ def get_latest_release_info():
try:
print_status("Retrieving release info from GitHub...")
with request.urlopen(GITHUB_API_URL) as response:
charset = response.info().get_param("charset") or "utf-8"
releases = json.loads(response.read().decode(charset))
releases = json.load(response)
print_result("OK!", COLOR_GREEN)
except:
print_result("FAILED!", COLOR_RED)
Expand Down

0 comments on commit 6382d79

Please sign in to comment.