Skip to content

Commit

Permalink
#236 Improve error message when using unquoted Senza variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcs committed Jun 24, 2016
1 parent 4f2b9b1 commit 48ef124
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions senza/error_handling.py
Expand Up @@ -2,6 +2,7 @@
from tempfile import NamedTemporaryFile
from traceback import format_exception

import yaml.constructor
from botocore.exceptions import ClientError, NoCredentialsError


Expand Down Expand Up @@ -77,6 +78,11 @@ def __call__(self, *args, **kwargs):
self.die_credential_error()
else:
self.die_unknown_error(e)
except yaml.constructor.ConstructorError as e:
print("Error parsing definition file:")
print(e)
if e.problem == "found unhashable key":
print("Please quote all variable values")
except Exception as e:
# Catch All
self.die_unknown_error(e)

0 comments on commit 48ef124

Please sign in to comment.