Skip to content

Commit

Permalink
fix using undocumented api
Browse files Browse the repository at this point in the history
  • Loading branch information
Fallen-Breath committed Apr 4, 2023
1 parent a0131d4 commit 6ed1eb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
test.py
*.log
*.pyc
/__pycache__
__pycache__
StatsHelper.py
/stats_helper
/more_apis
*.zip
*.mcdr
*.pyz
*.bat
*.sh
ChatBridge_*.json
2 changes: 1 addition & 1 deletion chatbridge/impl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def load_config(config_path: str, config_class: Type[T]) -> T:
raise FileNotFoundError(config_path)
else:
with open(config_path, encoding='utf8') as file:
config.update_from(json.load(file))
vars(config).update(vars(config_class.deserialize(json.load(file))))
with open(config_path, 'w', encoding='utf8') as file:
json.dump(config.serialize(), file, ensure_ascii=False, indent=4)
return config
Expand Down

0 comments on commit 6ed1eb2

Please sign in to comment.