Commit 722f2c2
Do not decode response data in Python2 (#225)
response data is already str in Python2 so it doesn't need to be decoded.
Furthermore, as decode() uses ascii by default in PY2, it breaks in case of a non-ascii character the response.
Just mimic what kubernetes do in https://github.com/kubernetes-client/python/blob/master/kubernetes/client/rest.py#L216
Fix #224
(cherry picked from commit 8e3a2e9)1 parent 9e660c1 commit 722f2c2
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
57 | 62 | | |
58 | 63 | | |
59 | 64 | | |
| |||
0 commit comments