skymill / cumulus

Cumulus is a deployment suite used to deploy and manage environments built with AWS CloudFormation
http://cumulus-ds.readthedocs.org/
Apache License 2.0
12 stars 5 forks source link

Catch missing template OSError #122

Closed sebdah closed 10 years ago

sebdah commented 10 years ago

We should catch the following:

2014-03-14 13:34:28,039 - cumulus - ERROR - [Errno 2] No such file or directory: 'cf-general-management.json'
Traceback (most recent call last):
  File "/usr/local/bin/cumulus", line 28, in <module>
    cumulus_ds.main()
  File "/usr/local/lib/python2.7/site-packages/cumulus_ds/__init__.py", line 103, in main
    deployment_manager.deploy()
  File "/usr/local/lib/python2.7/site-packages/cumulus_ds/deployment_manager.py", line 39, in deploy
    tags=config.get_stack_tags(stack_name))
  File "/usr/local/lib/python2.7/site-packages/cumulus_ds/helpers/stack.py", line 139, in ensure_stack
    template_body=_get_json_from_template(template),
  File "/usr/local/lib/python2.7/site-packages/cumulus_ds/helpers/stack.py", line 272, in _get_json_from_template
    file_handle = open(template_path)
IOError: [Errno 2] No such file or directory: 'cf-general-management.json'

The reason is that the template simple does not exist on the appointed path.