]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
fix minor double-serialization bug in client.py
authorDan Wendlandt <dan@nicira.com>
Sun, 16 Oct 2011 03:56:24 +0000 (20:56 -0700)
committerDan Wendlandt <dan@nicira.com>
Thu, 27 Oct 2011 21:53:52 +0000 (14:53 -0700)
bug 875468

Change-Id: If79d747c4a2796198e3d968f6bc5fbdca2621f73

quantum/client.py

index 48f9b568f66245c61e982d1100a21fb5201d96d8..cf72f8a7ec8233049871bdb398b71f711201148f 100644 (file)
@@ -229,7 +229,7 @@ class Client(object):
         elif type(data) is dict:
             return Serializer().serialize(data, self.content_type())
         else:
-            raise Exception("unable to deserialize object of type = '%s'" \
+            raise Exception("unable to serialize object of type = '%s'" \
                                 % type(data))
 
     def deserialize(self, data, status_code):
@@ -308,7 +308,6 @@ class Client(object):
         """
         Creates a new port on a given network
         """
-        body = self.serialize(body)
         return self.do_request("POST", self.ports_path % (network), body=body,
                        exception_args={"net_id": network})