feedwarrior

Slim, portable tooling for creating and distributing decentralized append logs
git clone git://git.defalsify.org/logwarrior.git
Log | Files | Refs | README | LICENSE

commit 7509d1413af3bcd32ffa938b62bfab4c56320759
parent 9e3148851aadd782d327676788d4a5086bc63214
Author: lash <dev@holbrook.no>
Date:   Wed, 12 Jan 2022 21:13:28 +0000

Report missing config file

Diffstat:
Mfeedwarrior/config.py | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/feedwarrior/config.py b/feedwarrior/config.py @@ -22,18 +22,18 @@ class config: # TODO: this make no sense # if filename == None: - config_paths = BaseDirectory.load_config_paths('feedwarrior') + config_paths += BaseDirectory.load_config_paths('feedwarrior') if filename != None: for p in config_paths: - try: - cp.read(os.path.join(p, filename)) - logg.info('successfully read config {}'.format(p)) - config_loaded = True - break - except FileNotFoundError: - logg.debug('config file {} not found'.format(p)) - pass + config_path = os.path.join(p, filename) + r = cp.read(config_path) + if len(r) == 0: + logg.warning("config file in path {} not found".format(config_path)) + continue + + logg.info('successfully read config {}'.format(p)) + config_loaded = True if cp.has_option('FEEDWARRIOR', 'datadir'): self.data_dir = cp['FEEDWARRIOR']['datadir']