]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat api: ec2token remove unnecessary jsonutils retry
authorSteven Hardy <shardy@redhat.com>
Thu, 2 May 2013 19:14:13 +0000 (20:14 +0100)
committerSteven Hardy <shardy@redhat.com>
Thu, 2 May 2013 19:14:13 +0000 (20:14 +0100)
Remove the try/catch around jsonutils dumps, since this is
handled internally by jsonutils via the dumps default parameter

Change-Id: I66c63b441f61cde506ef40e3eace60c3c41e90ca

heat/api/aws/ec2token.py

index c907fd70bee6c734518391ddd513e92c9ae25385..daaf32b8caa140a0f051cb88b81fe66b65307af0 100644 (file)
@@ -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