1
0
Fork 0
mirror of synced 2024-11-17 05:55:34 -05:00

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

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: