From eaf781c78752c82cfb21c3529f0ad4c458048125 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Thu, 27 Apr 2017 21:08:50 -0500 Subject: [PATCH] fix for #187 failure when using RFC 6902 json-patch operation --- kubernetes/client/rest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/client/rest.py b/kubernetes/client/rest.py index 826d4467b..8b3a5dabd 100644 --- a/kubernetes/client/rest.py +++ b/kubernetes/client/rest.py @@ -154,8 +154,8 @@ class RESTClientObject(object): if query_params: url += '?' + urlencode(query_params) if headers['Content-Type'] == 'application/json-patch+json': - headers[ - 'Content-Type'] = 'application/strategic-merge-patch+json' + if not isinstance(body, list): + headers['Content-Type'] = 'application/strategic-merge-patch+json' request_body = None if body: request_body = json.dumps(body)