Skip to content

Missing config should cause more meaningful error message #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
brejoc opened this issue Nov 29, 2016 · 0 comments
Open

Missing config should cause more meaningful error message #5

brejoc opened this issue Nov 29, 2016 · 0 comments

Comments

@brejoc
Copy link
Member

brejoc commented Nov 29, 2016

This is the strack trace the user sees, when path to the config is missing:

Traceback (most recent call last):
  File "/usr/local/bin/inv", line 9, in <module>
    load_entry_point('invoke==0.7.0', 'console_scripts', 'inv')()
  File "/usr/local/lib/python2.7/dist-packages/invoke/cli.py", line 263, in main
    dispatch(argv)
  File "/usr/local/lib/python2.7/dist-packages/invoke/cli.py", line 252, in dispatch
    dedupe=not args['no-dedupe']
  File "/usr/local/lib/python2.7/dist-packages/invoke/executor.py", line 76, in execute
    results[t] = t(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/invoke/tasks.py", line 70, in __call__
    result = self.body(*args, **kwargs)
  File "/src/_bnd/tasks.py", line 117, in prepare_paths
    config_values = get_config_vars(config)
  File "/src/_bnd/tasks_helper/config_generator.py", line 17, in get_config_vars
    stream = file(config, 'r')
IOError: [Errno 2] No such file or directory: 'configs/production.yaml'

Instead the user should see a more meaningful error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant