Support ./config.yaml as a config file location.

This commit is contained in:
Fabio Manganiello 2023-07-15 01:29:41 +02:00
parent fa1364d854
commit 0a3d6add83
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -36,9 +36,11 @@ class Config:
""" """
# Default config file locations: # Default config file locations:
# - current directory
# - $HOME/.config/platypush/config.yaml # - $HOME/.config/platypush/config.yaml
# - /etc/platypush/config.yaml # - /etc/platypush/config.yaml
_cfgfile_locations = [ _cfgfile_locations = [
os.path.join(os.path.abspath('.'), 'config.yaml'),
os.path.join(os.path.expanduser('~'), '.config', 'platypush', 'config.yaml'), os.path.join(os.path.expanduser('~'), '.config', 'platypush', 'config.yaml'),
os.path.join(os.sep, 'etc', 'platypush', 'config.yaml'), os.path.join(os.sep, 'etc', 'platypush', 'config.yaml'),
] ]