Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
lee1043 committed Dec 11, 2024
1 parent a3c66b4 commit 221f612
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pcmdi_metrics/variability_mode/variability_modes_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,8 @@
if os.path.isfile(json_file) and os.stat(json_file).st_size > 0:
copyfile(json_file, json_file_org)
if update_json:
fj = open(json_file)
result_dict = json.loads(fj.read())
fj.close()
with open(json_file) as fj:
result_dict = json.load(fj)

if "REF" not in result_dict:
result_dict["REF"] = {}
Expand Down

0 comments on commit 221f612

Please sign in to comment.