Files
python-neutronclient/tests/unit/test_http.py
Roman Podolyaka 86a56d3cfd Don't convert httplib2 exceptions to status codes
Currently HTTPClient class sets the 'force_exception_to_status_code'
instance variable to True. This actually leads to the next problem:
there is no way to distinguish between errors which have the same
status code. E. g. both SSL handshake error and a general Bad Request
error have status code 400, and the only way to distinguish between them
is to analyze the error message content, that is both error-prone and ugly.

The proposed solution:
  - leaves the 'force_exception_to_status_code' set to False
  - adds a try/except wrapper for the request() call to handle
    httplib2 exceptions (e. g. host not found, socket timeout, etc)

Blueprint: quantum-client-ssl

Change-Id: Ib168fadc67568d5d6247f7addbe731e8832a39de
2013-07-08 11:04:57 +03:00

1.9 KiB