Closed
Description
Issue Summary
In the new release 3.3.0, the variable exc
is referenced before assignement in the client.py file. It worked fine on version 3.2.7. It looks like L182 needs to be before L178.
Exception/Log
Exception
UnboundLocalError: local variable 'exc' referenced before assignment
python_http_client/client.py in _make_request at line 180
Log
try:
return opener.open(request, timeout=timeout)
except HTTPError as err:
_logger.debug('{method} Response: {status} {body}'.format(
method=request.get_method(),
status=exc.status_code,
body=exc.body))
exc = handle_error(err)
exc.__cause__ = None
raise exc
Technical details:
- python-http-client version: 3.3.0
- python version: 3.7