aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.py')
-rw-r--r--src/utils.py5
1 files changed, 5 insertions, 0 deletions
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]