patronictl checks if --config value exists
Be verbose about configuration file when the given filename does not exists instead of ignoring silently (which can lead to misunderstanding)
@@ -69,6 +69,9 @@ def parse_dcs(dcs):
def load_config(path, dcs):
+ if not (os.path.exists(path) and os.access(path, os.R_OK)):
+ logging.debug('Ignoring configuration file "%s". It does not exists or is not readable.', path)
+ else:
logging.debug('Loading configuration from file %s', path)
config = {}
old_argv = list(sys.argv)
