From b7f129b29b8b8103336bfae265b3d5a0bc5ea03a Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 1 Sep 2023 19:17:17 +0300 Subject: Initial commit --- src/utils.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/utils.py (limited to 'src/utils.py') diff --git a/src/utils.py b/src/utils.py new file mode 100644 index 0000000..ac07bf7 --- /dev/null +++ b/src/utils.py @@ -0,0 +1,5 @@ +def get_param(key: str, params: dict[str, str]) -> str: + if key not in params: + raise Exception(f"no {key} field in config entry: " + str(params)) + + return params[key] -- cgit v1.3