pathlib config path - short version

This commit is contained in:
genofire 2020-09-26 22:08:01 +02:00
parent 714548b0c7
commit a9e9f2e174
1 changed files with 2 additions and 3 deletions

View File

@ -14,9 +14,8 @@ class Config:
self.content = None self.content = None
# select config file # select config file
if Path.exists(Path("config.yml")):
self.conf_file = Path("config.yml") self.conf_file = Path("config.yml")
else: if not Path.exists(self.conf_file):
self.conf_file = Path("/etc/ejabberd-metrics.yml") self.conf_file = Path("/etc/ejabberd-metrics.yml")
# read config file # read config file