Skip to content

Commit

Permalink
add support for attach api call using websockets.
Browse files Browse the repository at this point in the history
  • Loading branch information
skuda committed Apr 18, 2017
1 parent 84fdbd7 commit 5a590f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kubernetes/client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def request(self, method, url, query_params=None, headers=None,
"""
# FIXME(dims) : We need a better way to figure out which
# calls end up using web sockets
if url.endswith('/exec') and (method == "GET" or method == "POST"):
if (url.endswith('/exec') or url.endswith('/attach')) and (method == "GET" or method == "POST"):
return ws_client.websocket_call(self.config,
url,
query_params=query_params,
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/ws_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def websocket_call(configuration, url, query_params, _request_timeout,
if isinstance(commands, list):
for command in commands:
url += "&command=%s&" % quote_plus(command)
else:
elif commands is not None:
url += '&command=' + quote_plus(commands)

try:
Expand Down

0 comments on commit 5a590f8

Please sign in to comment.