's'
This commit is contained in:
@@ -2,8 +2,11 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import configparser
|
||||
import io
|
||||
from pathlib import Path
|
||||
|
||||
from src.config_governance import save_managed_file
|
||||
|
||||
|
||||
def write_youtube_ini_stream_key(repo_root: Path, stream_key_or_url: str) -> str:
|
||||
root = repo_root.resolve()
|
||||
@@ -19,6 +22,7 @@ def write_youtube_ini_stream_key(repo_root: Path, stream_key_or_url: str) -> str
|
||||
if not parser.has_section("youtube"):
|
||||
parser.add_section("youtube")
|
||||
parser.set("youtube", "key", value)
|
||||
with cfg_path.open("w", encoding="utf-8") as fh:
|
||||
parser.write(fh)
|
||||
buf = io.StringIO()
|
||||
parser.write(buf)
|
||||
save_managed_file("app-config", "youtube.ini", buf.getvalue())
|
||||
return f"wrote {cfg_path}"
|
||||
|
||||
Reference in New Issue
Block a user