Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 05d60fc

Browse files
authored
Merge pull request #211 from mbohlool/automated-cherry-pick-of-#205-upstream-master
Automated cherry pick of #205
2 parents b5eac1f + 058b81b commit 05d60fc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# v2.0.0
22
- No changes. The same as `v2.0.0b1`.
33

4+
# v2.0.0b2
5+
- Bugfix: support RFC6902 'json-patch' operations #187
6+
47
# v1.0.1
58
- Bugfix: urllib3 1.21 fails tests, Excluding version 1.21 from dependencies #197
69

kubernetes/client/rest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ def request(self, method, url, query_params=None, headers=None,
154154
if query_params:
155155
url += '?' + urlencode(query_params)
156156
if headers['Content-Type'] == 'application/json-patch+json':
157-
headers[
158-
'Content-Type'] = 'application/strategic-merge-patch+json'
157+
if not isinstance(body, list):
158+
headers['Content-Type'] = 'application/strategic-merge-patch+json'
159159
request_body = None
160160
if body:
161161
request_body = json.dumps(body)

0 commit comments

Comments
 (0)