mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
parent
90d283b3b8
commit
172a2b9b98
1 changed files with 8 additions and 6 deletions
|
|
@ -292,12 +292,14 @@ def _validate_pair_section(pair_config):
|
||||||
|
|
||||||
|
|
||||||
def load_config():
|
def load_config():
|
||||||
fname = expand_path(os.environ.get('VDIRSYNCER_CONFIG',
|
fname = os.environ.get('VDIRSYNCER_CONFIG', None)
|
||||||
'~/.vdirsyncer/config'))
|
if not fname:
|
||||||
if not os.path.exists(fname):
|
fname = expand_path('~/.vdirsyncer/config')
|
||||||
xdg_config_dir = os.environ.get('XDG_CONFIG_HOME',
|
if not os.path.exists(fname):
|
||||||
expand_path('~/.config/'))
|
xdg_config_dir = os.environ.get('XDG_CONFIG_HOME',
|
||||||
fname = os.path.join(xdg_config_dir, 'vdirsyncer/config')
|
expand_path('~/.config/'))
|
||||||
|
fname = os.path.join(xdg_config_dir, 'vdirsyncer/config')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(fname) as f:
|
with open(fname) as f:
|
||||||
general, pairs, storages = read_config(f)
|
general, pairs, storages = read_config(f)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue