Skip to content

Commit

Permalink
Disable debug logging for streaming http requests
Browse files Browse the repository at this point in the history
consuming the response content breaks streaming responses in e.g. watch_list
  • Loading branch information
oyvindio committed Jul 31, 2017
1 parent c1556e2 commit 50e40b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion k8s/client.py
Expand Up @@ -63,7 +63,7 @@ def put(self, url, body, timeout=DEFAULT_TIMEOUT_SECONDS):
def _call(self, method, url, body=None, timeout=DEFAULT_TIMEOUT_SECONDS, **kwargs):
self.init_session()
resp = self._session.request(method, config.api_server + url, json=body, timeout=timeout, **kwargs)
if config.debug:
if config.debug and not kwargs.get('stream', False):
message = ['{:d} for url: {:s}'.format(resp.status_code, resp.url)]
Client._add_request(message, resp.request)
Client._add_response(message, resp)
Expand Down

0 comments on commit 50e40b4

Please sign in to comment.