Cleanup: Remove pointless calls to close()

Since "with open()" automatically closes the files anyway.
This commit is contained in:
Bananaman
2023-03-24 22:37:01 +01:00
parent 214687c9ce
commit 973ec01b38
7 changed files with 0 additions and 11 deletions

View File

@@ -107,7 +107,6 @@ def heroic_parser(parent_widget, action):
os.path.join(heroic_dir, "lib-cache", "library.json"), "r"
) as open_file:
data = open_file.read()
open_file.close()
library = json.loads(data)
try:
@@ -160,7 +159,6 @@ def heroic_parser(parent_widget, action):
os.path.join(heroic_dir, "gog_store", "installed.json"), "r"
) as open_file:
data = open_file.read()
open_file.close()
installed = json.loads(data)
for item in installed["installed"]:
values = {}
@@ -179,7 +177,6 @@ def heroic_parser(parent_widget, action):
os.path.join(heroic_dir, "gog_store", "library.json"), "r"
) as open_file:
data = open_file.read()
open_file.close()
library = json.loads(data)
for game in library["games"]:
if game["app_name"] == app_name:
@@ -214,7 +211,6 @@ def heroic_parser(parent_widget, action):
os.path.join(heroic_dir, "sideload_apps", "library.json"), "r"
) as open_file:
data = open_file.read()
open_file.close()
library = json.loads(data)
for item in library["games"]:
values = {}