Skip to content

Commit 2dffaad

Browse files
committed
added api_client patch
1 parent 3061ad2 commit 2dffaad

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

scripts/api_client_patch.diff

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/kubernetes/client/api_client.py b/kubernetes/client/api_client.py
2+
index 558f0e734..aeace543e 100644
3+
--- a/kubernetes/client/api_client.py
4+
+++ b/kubernetes/client/api_client.py
5+
@@ -199,7 +199,7 @@ class ApiClient(object):
6+
7+
response_type = response_types_map.get(response_data.status, None)
8+
9+
- if six.PY3 and response_type not in ["file", "bytes"]:
10+
+ if six.PY3 and response_type not in ["file", "bytes", "str"]:
11+
match = None
12+
content_type = response_data.getheader('content-type')
13+
if content_type is not None:

scripts/update-client.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ sed -i'' "s,^DEVELOPMENT_STATUS = .*,DEVELOPMENT_STATUS = \\\"${DEVELOPMENT_STAT
6969
# second, this should be ported to swagger-codegen
7070
echo ">>> patching client..."
7171
git apply "${SCRIPT_ROOT}/rest_client_patch.diff"
72+
git apply "${SCRIPT_ROOT}/api_client_patch.diff"
7273
# The following is commented out due to:
7374
# AttributeError: 'RESTResponse' object has no attribute 'headers'
7475
# OpenAPI client generator prior to 6.4.0 uses deprecated urllib3 APIs.

0 commit comments

Comments
 (0)