pytroll / pytroll-collectors

Collector modules for Pytroll
GNU General Public License v3.0
3 stars 18 forks source link

gatherer does not complain when configuration file does not exist #72

Closed gerritholl closed 2 years ago

gerritholl commented 3 years ago

Summary

When the configuration file passed to gatherer does not exist (or otherwise cannot be read), there is neither a warning nor an error from gatherer.py. From the console output (or logfile output) there is no direct indication that anything is wrong — only the indirect evidence from the observation that it doesn't seem to be doing much.

MCVE

$ gatherer.py -v /does/not/exist

Expected output

I think this should fail immediately, as I don't see any way in which this error could be recoverable.

Actual output

$ gatherer.py -v /does/not/exist
Setting timezone to UTC
[INFO: 2021-01-14 15:02:24 : posttroll.publisher] publisher started on port 38155
gerritholl commented 2 years ago

From the ConfigParser.read documentation:

Files that cannot be opened are silently ignored; this is designed so that you can specify an iterable of potential configuration file locations (e.g. current directory, user's home directory, systemwide directory), and all existing configuration files in the iterable will be read. A single filename may also be given.

:S