Skip to content
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

Have nicer error when config or env arent found #28

Open
viglesiasce opened this issue Apr 27, 2015 · 0 comments
Open

Have nicer error when config or env arent found #28

viglesiasce opened this issue Apr 27, 2015 · 0 comments
Labels

Comments

@viglesiasce
Copy link
Owner

Currently if the environment or config file is not found we bail out in a nasty stack trace. We should catch this and provide a useful error message:

[root@h-01 ~]# euca-deploy uninstall -e shared-setup-1.yml 
Traceback (most recent call last):
  File "/usr/bin/euca-deploy", line 5, in <module>
    pkg_resources.run_script('Euca-Deploy==0.1a', 'euca-deploy')
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 461, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1194, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/lib/python2.6/site-packages/Euca_Deploy-0.1a-py2.6.egg/EGG-INFO/scripts/euca-deploy", line 23, in <module>
    args.branch)
  File "/usr/lib/python2.6/site-packages/Euca_Deploy-0.1a-py2.6.egg/eucadeploy/componentdeployer.py", line 16, in __init__
    self.config = self.read_config()
  File "/usr/lib/python2.6/site-packages/Euca_Deploy-0.1a-py2.6.egg/eucadeploy/componentdeployer.py", line 41, in read_config
    return yaml.load(open(self.config_file).read())
IOError: [Errno 2] No such file or directory: 'etc/config.yml'
@viglesiasce viglesiasce added this to the Production Ready milestone Apr 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant