From: Steven Hardy Date: Thu, 2 May 2013 19:14:13 +0000 (+0100) Subject: heat api: ec2token remove unnecessary jsonutils retry X-Git-Tag: 2014.1~651^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=34cc7d2ca927fc94ca7d359ae0ea1e3136c9449c;p=openstack-build%2Fheat-build.git heat api: ec2token remove unnecessary jsonutils retry Remove the try/catch around jsonutils dumps, since this is handled internally by jsonutils via the dumps default parameter Change-Id: I66c63b441f61cde506ef40e3eace60c3c41e90ca --- diff --git a/heat/api/aws/ec2token.py b/heat/api/aws/ec2token.py index c907fd70..daaf32b8 100644 --- a/heat/api/aws/ec2token.py +++ b/heat/api/aws/ec2token.py @@ -133,11 +133,7 @@ class EC2Token(wsgi.Middleware): 'headers': req.headers, 'body_hash': body_hash }} - creds_json = None - try: - creds_json = json.dumps(creds) - except TypeError: - creds_json = json.dumps(json.to_primitive(creds)) + creds_json = json.dumps(creds) headers = {'Content-Type': 'application/json'} # Disable 'has no x member' pylint error