Merge pull request #180 from skuda/master

add support for attach api call using websockets.
This commit is contained in:
Mehdy Bohlool 2017-04-18 10:17:16 -07:00 committed by GitHub
commit 542facbf07
2 changed files with 2 additions and 2 deletions

View File

@ -346,7 +346,7 @@ class ApiClient(object):
"""
# 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,

View File

@ -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: