diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-09-12 12:14:06 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-09-12 12:14:06 +0000 |
commit | 64529f856c4fe361d55c1736a8433db4d8901fe8 (patch) | |
tree | 045f1da5e03e2c5b08efa9feb882e0694bc5fad4 | |
parent | 8b43b2fecaf74786b339ca18aa5d7f3e30202c2f (diff) | |
parent | ed0ffb8ab92fd7e32a79ce39c2b9179d14e2f153 (diff) | |
download | oslo-incubator-64529f856c4fe361d55c1736a8433db4d8901fe8.tar.gz |
Merge "Do not incur the cost of a second method call"
-rw-r--r-- | openstack/common/apiclient/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openstack/common/apiclient/client.py b/openstack/common/apiclient/client.py index 5771f4a1..9c4bcabf 100644 --- a/openstack/common/apiclient/client.py +++ b/openstack/common/apiclient/client.py @@ -156,7 +156,7 @@ class HTTPClient(object): requests.Session.request (such as `headers`) or `json` that will be encoded as JSON and used as `data` argument """ - kwargs.setdefault("headers", kwargs.get("headers", {})) + kwargs.setdefault("headers", {}) kwargs["headers"]["User-Agent"] = self.user_agent if self.original_ip: kwargs["headers"]["Forwarded"] = "for=%s;by=%s" % ( |