mirror of
1
0
Fork 0

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:
Anish Athalye 2015-04-26 19:46:14 -04:00
parent 3a649c1112
commit 3c60899895
1 changed files with 2 additions and 0 deletions

View File

@ -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: