diff options
author | Anish Athalye <me@anishathalye.com> | 2015-04-26 19:46:14 -0400 |
---|---|---|
committer | Anish Athalye <me@anishathalye.com> | 2015-04-26 19:46:14 -0400 |
commit | 3c60899895536d3afbf32f0950f0d1a34a6383ed (patch) | |
tree | 09e46da4fb3127a2d4174c086a21efc660941a3e /dotbot | |
parent | 3a649c11128e657a02fb79fce4bc7a039ee0dfe0 (diff) |
Improve error message for malformed files
This patch makes Dotbot warn the user and gracefully exit when the
configuration file is not a list.
Diffstat (limited to 'dotbot')
-rw-r--r-- | dotbot/cli.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dotbot/cli.py b/dotbot/cli.py index fffc017..dc90909 100644 --- a/dotbot/cli.py +++ b/dotbot/cli.py @@ -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: |