Skip to content

Commit

Permalink
Safely read config
Browse files Browse the repository at this point in the history
  • Loading branch information
seallard committed Jan 24, 2024
1 parent 6e264cf commit 268b071
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fusion_report/args_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class ArgsBuilder:

def __init__(self):
configuration = os.path.join(Settings.ROOT_DIR, "arguments.json")
self.arguments: Dict[str, Any] = rapidjson.loads(open(configuration, "r").read())
with open(configuration, "r") as config_file:
self.arguments: Dict[str, Any] = rapidjson.loads(config_file.read())
self.arguments["weight"] = float(100 / len(self.supported_tools))
self.parser = ArgumentParser(
description="""Tool for generating friendly UI custom report."""
Expand Down

0 comments on commit 268b071

Please sign in to comment.