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

Wrong use of json_checker in ssm.py causing errors #1260

Closed
seddarj opened this issue Dec 24, 2018 · 1 comment
Closed

Wrong use of json_checker in ssm.py causing errors #1260

seddarj opened this issue Dec 24, 2018 · 1 comment

Comments

@seddarj
Copy link
Contributor

seddarj commented Dec 24, 2018

I think there's an issue with the way the json_checker is being used in https://github.com/cloudtools/troposphere/blob/master/troposphere/ssm.py#L38

This validator is supposed to take 2 arguments as input but if used as an attribute type, it will only get one thus spitting the following error:

TypeError: json_checker() takes exactly 2 arguments (1 given)

I think it is supposed to be used as part of another validator that can be used as an attribute type, see here for an example:

self.properties[name] = json_checker(name, schema)

markpeek added a commit that referenced this issue Jan 12, 2019
The json_checker validator was being used in both a 1 and 2 argument
manner across the code base. This change removes the name parameter
to allow for usage as an attribute validator.
@markpeek
Copy link
Member

Nice catch! Surprised more people weren't seeing issues. I just pushed a change to resolve it.

davemasino pushed a commit to davemasino/troposphere that referenced this issue Oct 17, 2019
The json_checker validator was being used in both a 1 and 2 argument
manner across the code base. This change removes the name parameter
to allow for usage as an attribute validator.
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

2 participants