Skip to content

Commit 1e0b05b

Browse files
committed
added status to WSResponse
1 parent 81bf6c4 commit 1e0b05b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kubernetes/base/stream/ws_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def close(self, **kwargs):
254254
self.sock.close(**kwargs)
255255

256256

257-
WSResponse = collections.namedtuple('WSResponse', ['data'])
257+
WSResponse = collections.namedtuple('WSResponse', ['data', 'status'])
258258

259259

260260
class PortForward:
@@ -536,9 +536,9 @@ def websocket_call(configuration, _method, url, **kwargs):
536536
client.run_forever(timeout=_request_timeout)
537537
all = client.read_all()
538538
if binary:
539-
return WSResponse(all)
539+
return WSResponse(data=all, status=0)
540540
else:
541-
return WSResponse('%s' % ''.join(all))
541+
return WSResponse(data='%s' % ''.join(all), status=0)
542542
except (Exception, KeyboardInterrupt, SystemExit) as e:
543543
raise ApiException(status=0, reason=str(e))
544544

0 commit comments

Comments
 (0)