Skip to content

Commit

Permalink
core: libs: commonwealth: settings: pykson: Save in pretty json
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
  • Loading branch information
patrickelectric committed Jun 20, 2024
1 parent 3094f08 commit d8e5c82
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def save(self, file_path: pathlib.Path) -> None:

with open(file_path, "w", encoding="utf-8") as settings_file:
logger.debug(f"Saving settings on: {file_path}")
settings_file.write(Pykson().to_json(self))
settings_file.write(json.dumps(json.loads(Pykson().to_json(self))), indent=4)

def reset(self) -> None:
"""Reset internal data to default values"""
Expand Down

0 comments on commit d8e5c82

Please sign in to comment.