summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-08-24 20:30:47 +0000
committerGerrit Code Review <review@openstack.org>2016-08-24 20:30:47 +0000
commita46c7fdc1b79392d8b89b2d232b1ff5764160d04 (patch)
treeceac6d4e520e86fb411553e75456894b74407a2d
parente283d415e2d89eb50bab42c316397390fee9b81c (diff)
parent744c9b6adaf51d689ad589e0c727bf800d00628a (diff)
downloadpython-novaclient-a46c7fdc1b79392d8b89b2d232b1ff5764160d04.tar.gz
Merge "Replace functions 'Dict.get' and 'del' with 'Dict.pop'"
-rw-r--r--novaclient/client.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/novaclient/client.py b/novaclient/client.py
index 1668af46..2e5f125a 100644
--- a/novaclient/client.py
+++ b/novaclient/client.py
@@ -377,8 +377,7 @@ class HTTPClient(object):
kwargs['headers']['Accept'] = 'application/json'
if 'body' in kwargs:
kwargs['headers']['Content-Type'] = 'application/json'
- kwargs['data'] = json.dumps(kwargs['body'])
- del kwargs['body']
+ kwargs['data'] = json.dumps(kwargs.pop('body'))
api_versions.update_headers(kwargs["headers"], self.api_version)
if self.timeout is not None:
kwargs.setdefault('timeout', self.timeout)