Improve error message for malformed files
This patch makes Dotbot warn the user and gracefully exit when the configuration file is not a list.
This commit is contained in:
parent
3a649c1112
commit
3c60899895
1 changed files with 2 additions and 0 deletions
|
@ -35,6 +35,8 @@ def main():
|
|||
if (options.verbose):
|
||||
log.set_level(Level.DEBUG)
|
||||
tasks = read_config(options.config_file[0])
|
||||
if not isinstance(tasks, list):
|
||||
raise ReadingError('Configuration file must be a list of tasks')
|
||||
dispatcher = Dispatcher(options.base_directory[0])
|
||||
success = dispatcher.dispatch(tasks)
|
||||
if success:
|
||||
|
|
Loading…
Reference in a new issue