config.py

changeset 22
c3e95212e3f0
parent 21
c36e549a7f12
child 23
86b42610d5a8
equal deleted inserted replaced
21:c36e549a7f12 22:c3e95212e3f0
117 cfgfile=os.path.join(xdg.XDG_CONFIG_HOME, "borgend", "config.yaml") 117 cfgfile=os.path.join(xdg.XDG_CONFIG_HOME, "borgend", "config.yaml")
118 118
119 logging.info("Reading configuration file %s" % cfgfile) 119 logging.info("Reading configuration file %s" % cfgfile)
120 120
121 if not (os.path.exists(cfgfile) and os.path.isfile(cfgfile)): 121 if not (os.path.exists(cfgfile) and os.path.isfile(cfgfile)):
122 raise SystemExit(f'Configuration file required: {cfgfile}') 122 raise SystemExit('Configuration file required: {cfgfile}')
123 123
124 with io.open(cfgfile, 'r') as file: 124 with io.open(cfgfile, 'r') as file:
125 settings=expand_env(yaml.load(file), os.environ); 125 settings=expand_env(yaml.load(file), os.environ);
126 126
127 # 127 #

mercurial