Skip to content

Commit

Permalink
Patch json dumps logic to always assign string to non-serializable pr…
Browse files Browse the repository at this point in the history
…operties
  • Loading branch information
mariusmitrofan committed Feb 3, 2021
1 parent 7a2cd91 commit e9c0dd0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.7-alpine

RUN pip install stackuchin==1.5.4
RUN pip install stackuchin==1.5.5

VOLUME /project

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

here = path.abspath(path.dirname(__file__))

current_version = str('1.5.4')
current_version = str('1.5.5')

# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
Expand Down
2 changes: 1 addition & 1 deletion src/stackuchin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self):

# noinspection PyMethodMayBeStatic
def version(self):
print("1.5.4")
print("1.5.5")

# noinspection PyMethodMayBeStatic
def create(self):
Expand Down
2 changes: 1 addition & 1 deletion src/stackuchin/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def update(profile_name, stack_file, stack_name, secret, slack_webhook_url,
else:
template_body = stack_template_url['value']
if type(template_body) != str:
template_body = json.dumps(template_body)
template_body = json.dumps(template_body, default=str)
changeset = cf_client.create_change_set(StackName=stack_name,
TemplateBody=template_body,
Parameters=stack_parameters,
Expand Down
2 changes: 1 addition & 1 deletion src/stackuchin/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def upload(stack_file, stack_name, s3_bucket, s3_prefix,

output_object = {
"type": "TemplateBody",
"value": json.dumps(template_string)
"value": json.dumps(template_string, default=str)
}

template_key = None
Expand Down

0 comments on commit e9c0dd0

Please sign in to comment.