summaryrefslogtreecommitdiff
path: root/src/home/config/config.py
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-01-04 03:44:07 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-01-04 03:44:07 +0300
commitd549f428cbbd54c49a90f92928e670d373c4a0d9 (patch)
treeb895a216a37483c082af6f20b2d6aef8560db7b3 /src/home/config/config.py
parent00de2339b4a61921c4b8789883e5c77b4528a60b (diff)
config: use get_addr() instead of parse_addr(config[...])
Diffstat (limited to 'src/home/config/config.py')
-rw-r--r--src/home/config/config.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/home/config/config.py b/src/home/config/config.py
index 0c0e944..4681685 100644
--- a/src/home/config/config.py
+++ b/src/home/config/config.py
@@ -6,6 +6,7 @@ import os
from os.path import join, isdir, isfile
from typing import Optional, Any, MutableMapping
from argparse import ArgumentParser
+from ..util import parse_addr
def _get_config_path(name: str) -> str:
@@ -118,6 +119,9 @@ class ConfigStore:
cur = self.data[k]
raise KeyError(f'option {key} not found')
+ def get_addr(self, key: str):
+ return parse_addr(self.get(key))
+
def items(self):
return self.data.items()