fix(redirect80): extract .content from confs RPC response dict

RpcClient.call() returns the data dict, not a raw string.
configparser.read_string() expects str, hence TypeError.
Now uses .get("content") to unwrap the ini text.
This commit is contained in:
qing committed 2026-08-02 12:52:51 +08:00
1 parent f9c02cd6ad
commit c1724ccea9
1 file changed
+2 -1
+2 -1
View File
@@ -42,7 +42,8 @@ _confs_client = RpcClient(
_confs_host, _confs_port, "redirect80",
retry_on_refused=True, timeout=5,
)
_ini_text = _confs_client.call("get", {"name": "redirect80.ini"})
_data = _confs_client.call("get", {"name": "redirect80.ini"})
_ini_text = _data.get("content", "")
_ini = configparser.ConfigParser(interpolation=None)
_ini.read_string(_ini_text)