create_index config attribute ignored if config.yaml is present
I will create a pull request to fix this issue, if there is a config attribute passed to the create_index.py but there is a config.yaml in the folder, the config argument is ignored and the config.yaml is used.
The problem is located here:
if os.path.isfile(args.config):
filename = args.config
elif os.path.isfile('config.yaml'):
filename = 'config.yaml'
else:
filename = ''
should be:
if os.path.isfile(args.config):
filename = args.config
else:
filename = ''
Since the default value for the config variable is already config.yaml is nothing else is specified.
Would somebody confirm this is not intended?
The actual code is the other way round:
if os.path.isfile('config.yaml'):
filename = 'config.yaml'
elif os.path.isfile(args.config):
filename = args.config
else:
filename = ''
Which only encourages the needs for this to be updated since the --config option doesn't currently let you override the config file that is used.
Ohh yeah, that was already a version that I fixed, but later I realized that I can just delete one of the clauses and I got mixed up. I will submit the PR than. Thanks for the confirmation.