]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Use jsonutils in ec2token
authorAngus Salkeld <asalkeld@redhat.com>
Mon, 19 Nov 2012 04:04:44 +0000 (15:04 +1100)
committerAngus Salkeld <asalkeld@redhat.com>
Mon, 19 Nov 2012 05:12:01 +0000 (16:12 +1100)
To get access to to_primitive()

Change-Id: I9a09609b5469870a217386be9fbad9261ef0c815

heat/api/aws/ec2token.py

index dec0afd52c411398452d30cb49a5f194eba2b5aa..5becab2cf096f975416c405ecb9cc644ea0bd278 100644 (file)
@@ -13,7 +13,6 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import json
 import urlparse
 import httplib
 import gettext
@@ -21,6 +20,7 @@ import gettext
 gettext.install('heat', unicode=1)
 
 from heat.common import wsgi
+from heat.openstack.common import jsonutils as json
 
 import webob
 from heat.api.aws import exception
@@ -81,7 +81,7 @@ class EC2Token(wsgi.Middleware):
         try:
             creds_json = json.dumps(creds)
         except TypeError:
-            creds_json = json.dumps(to_primitive(creds))
+            creds_json = json.dumps(json.to_primitive(creds))
         headers = {'Content-Type': 'application/json'}
 
         # Disable 'has no x member' pylint error