fix minor double-serialization bug in client.py
bug 875468 Change-Id: If79d747c4a2796198e3d968f6bc5fbdca2621f73
This commit is contained in:
@@ -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})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user