aboutsummaryrefslogtreecommitdiffstats
path: root/config.py
diff options
context:
space:
mode:
authornico <nico@magicbroccoli.de>2020-06-29 11:03:49 +0200
committernico <nico@magicbroccoli.de>2020-06-29 11:03:49 +0200
commit5f0cb289c1d91513427ffdc8f646bc86516c2759 (patch)
tree21baf49489262b0e27ec94a8203d63aab17b1506 /config.py
parenta8b78be75d44dedf4b7fdf2eacb4d8a32e0b3aef (diff)
black reformat
* black reformatted the code
Diffstat (limited to 'config.py')
-rw-r--r--config.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/config.py b/config.py
index 20793e8..d4a7097 100644
--- a/config.py
+++ b/config.py
@@ -13,11 +13,11 @@ class Config:
def __init__(self):
# class variables
self.content = None
- self.conf_file = Path('/etc/ejabberd-metrics.yml')
+ self.conf_file = Path("/etc/ejabberd-metrics.yml")
# dev config overwrite
- if environ.get('ejabberd_metrics_dev'):
- self.conf_file = Path('config.yml')
+ if environ.get("ejabberd_metrics_dev"):
+ self.conf_file = Path("config.yml")
# read config file
self._read()
@@ -27,9 +27,9 @@ class Config:
self._check()
# open file as an iostream
- with open(self.conf_file, 'r', encoding='utf-8') as f:
+ with open(self.conf_file, "r", encoding="utf-8") as f:
try:
- self.content = YAML(typ='safe').load(f)
+ self.content = YAML(typ="safe").load(f)
# catch json decoding errors
except (ParserError, ScannerError) as err: