From e8d8e1f5be1ce29f8619662e4a6e46177d19d896 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Sat, 10 Feb 2024 18:34:27 +0100 Subject: [PATCH] use pydantic v2 --- scripts/create_conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create_conf.py b/scripts/create_conf.py index 395155b..97ee0d8 100644 --- a/scripts/create_conf.py +++ b/scripts/create_conf.py @@ -31,7 +31,7 @@ def write_wg(config: Config): def get_config() -> Optional[Config]: with open("/snacks/wireguard/wg.json", "r", encoding="utf-8") as f: - config = Config.parse_raw(f.read()) + config = Config.model_validate_json(f.read()) config.host = socket.gethostbyname(config.host) return config