)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"42458c9297d0d8b5b6e6941023223b85d79bd18f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kuo-tung Kao \u003cjelly.k@inwinstack.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-09 11:40:42 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Client exposes requests llibrary exception."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Novaclient expects the requests library to always be able to"},{"line_number":10,"context_line":"get a response back and doesn\u0027t handle other cases"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3afb71cf_ff00dc02","line":7,"updated":"2015-06-09 20:35:49.000000000","message":"s/ll/l/ (femtonit)","commit_id":"59da8d0189ea3d169116c161a7cb9dfab30fcfb4"},{"author":{"_account_id":13747,"name":"Kuo-tung Kao","email":"jelly.k@inwinstack.com","username":"coding1314"},"change_message_id":"d63e4e8186bb0bd7b224b0614409339a734fdf9b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kuo-tung Kao \u003cjelly.k@inwinstack.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-09 11:40:42 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Client exposes requests llibrary exception."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Novaclient expects the requests library to always be able to"},{"line_number":10,"context_line":"get a response back and doesn\u0027t handle other cases"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3afb71cf_138608db","line":7,"in_reply_to":"3afb71cf_ff00dc02","updated":"2015-06-10 02:35:44.000000000","message":"I will fix it.","commit_id":"59da8d0189ea3d169116c161a7cb9dfab30fcfb4"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"42458c9297d0d8b5b6e6941023223b85d79bd18f","unresolved":false,"context_lines":[{"line_number":12,"context_line":"before the request is completed (e.g. ConnectionError)."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"These exceptions should be captured"},{"line_number":15,"context_line":"and properly converted to some native novaclient exception."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I7079527ba4ee696d10ef1eea74d6788f2e7bef13"},{"line_number":18,"context_line":"Closes-Bug: #1406586"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3afb71cf_3f49d460","line":15,"updated":"2015-06-09 20:35:49.000000000","message":"Why?  Python\u0027s usual philosophy is to allow foreign exceptions to bubble up, only capturing them if necessary.  I\u0027m not rejecting this change (yet), but want to see a good justification for why we should convert such an exception.","commit_id":"59da8d0189ea3d169116c161a7cb9dfab30fcfb4"},{"author":{"_account_id":13747,"name":"Kuo-tung Kao","email":"jelly.k@inwinstack.com","username":"coding1314"},"change_message_id":"d63e4e8186bb0bd7b224b0614409339a734fdf9b","unresolved":false,"context_lines":[{"line_number":12,"context_line":"before the request is completed (e.g. ConnectionError)."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"These exceptions should be captured"},{"line_number":15,"context_line":"and properly converted to some native novaclient exception."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I7079527ba4ee696d10ef1eea74d6788f2e7bef13"},{"line_number":18,"context_line":"Closes-Bug: #1406586"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3afb71cf_f37ecc17","line":15,"in_reply_to":"3afb71cf_3f49d460","updated":"2015-06-10 02:35:44.000000000","message":"I am new to contribute openstack code. And I found the bug/1406586 is the bug  which I maybe fix it. So I try to contribute it. Also, I think that we should wrap internal exception for providing more information to user. Thank you for your help. All suggestions are welcomed.","commit_id":"59da8d0189ea3d169116c161a7cb9dfab30fcfb4"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"6a8a4ed3b935b88b6898f815ef19ff11fe2e7791","unresolved":false,"context_lines":[{"line_number":12,"context_line":"before the request is completed (e.g. ConnectionError)."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"These exceptions should be captured"},{"line_number":15,"context_line":"and properly converted to some native novaclient exception."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I7079527ba4ee696d10ef1eea74d6788f2e7bef13"},{"line_number":18,"context_line":"Closes-Bug: #1406586"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3afb71cf_97d3e45f","line":15,"in_reply_to":"3afb71cf_f37ecc17","updated":"2015-06-10 16:03:15.000000000","message":"OK, it\u0027s the bug I have a problem with, then :)  I\u0027ll make a comment there and refrain from downvoting this change for anything other than code quality issues…","commit_id":"59da8d0189ea3d169116c161a7cb9dfab30fcfb4"}],"novaclient/client.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"42458c9297d0d8b5b6e6941023223b85d79bd18f","unresolved":false,"context_lines":[{"line_number":33,"context_line":"import socket"},{"line_number":34,"context_line":"import warnings"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"from keystoneclient import adapter"},{"line_number":38,"context_line":"from oslo_utils import importutils"},{"line_number":39,"context_line":"from oslo_utils import netutils"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_ff9c5cc1","line":36,"updated":"2015-06-09 20:35:49.000000000","message":"Extraneous newline…","commit_id":"59da8d0189ea3d169116c161a7cb9dfab30fcfb4"},{"author":{"_account_id":13747,"name":"Kuo-tung Kao","email":"jelly.k@inwinstack.com","username":"coding1314"},"change_message_id":"d63e4e8186bb0bd7b224b0614409339a734fdf9b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"import socket"},{"line_number":34,"context_line":"import warnings"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"from keystoneclient import adapter"},{"line_number":38,"context_line":"from oslo_utils import importutils"},{"line_number":39,"context_line":"from oslo_utils import netutils"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_7391bc46","line":36,"in_reply_to":"3afb71cf_ff9c5cc1","updated":"2015-06-10 02:35:44.000000000","message":"I will remove it.","commit_id":"59da8d0189ea3d169116c161a7cb9dfab30fcfb4"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"42458c9297d0d8b5b6e6941023223b85d79bd18f","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        raise_exc \u003d kwargs.pop(\u0027raise_exc\u0027, True)"},{"line_number":98,"context_line":"        with utils.record_time(self.times, self.timings, method, url):"},{"line_number":99,"context_line":"            try:"},{"line_number":100,"context_line":"                resp, body \u003d super(SessionClient, self). \\"},{"line_number":101,"context_line":"                    request(url,"},{"line_number":102,"context_line":"                            method,"},{"line_number":103,"context_line":"                            raise_exc\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_bf794484","line":100,"updated":"2015-06-09 20:35:49.000000000","message":"Please avoid using backslash continuation wherever possible.  In this case, you could use:\n\n    resp, body \u003d super(SessionClient, self).request(\n        url, method, raise_exc\u003dFalse, **kwargs)","commit_id":"59da8d0189ea3d169116c161a7cb9dfab30fcfb4"},{"author":{"_account_id":13747,"name":"Kuo-tung Kao","email":"jelly.k@inwinstack.com","username":"coding1314"},"change_message_id":"d63e4e8186bb0bd7b224b0614409339a734fdf9b","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        raise_exc \u003d kwargs.pop(\u0027raise_exc\u0027, True)"},{"line_number":98,"context_line":"        with utils.record_time(self.times, self.timings, method, url):"},{"line_number":99,"context_line":"            try:"},{"line_number":100,"context_line":"                resp, body \u003d super(SessionClient, self). \\"},{"line_number":101,"context_line":"                    request(url,"},{"line_number":102,"context_line":"                            method,"},{"line_number":103,"context_line":"                            raise_exc\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_d3a2b098","line":100,"in_reply_to":"3afb71cf_bf794484","updated":"2015-06-10 02:35:44.000000000","message":"I will follow you suggestion in next commit.","commit_id":"59da8d0189ea3d169116c161a7cb9dfab30fcfb4"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"42458c9297d0d8b5b6e6941023223b85d79bd18f","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                            **kwargs)"},{"line_number":105,"context_line":"            except requests.HTTPError as e:"},{"line_number":106,"context_line":"                exception_message \u003d \"%s-%s\" % (e.__class__.__name__, str(e))"},{"line_number":107,"context_line":"                raise exceptions.ClientException(500, exception_message)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"            except requests.Timeout as e:"},{"line_number":110,"context_line":"                exception_message \u003d \"%s-%s\" % (e.__class__.__name__, str(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_7f22ac53","line":107,"updated":"2015-06-09 20:35:49.000000000","message":"A 500 indicates a server side error.  This would be an inappropriate error to raise to the user; if I, as a user, saw a 500 error coming back, I would assume that the problem was with the server and report it to the server administrator.  For this case, it would be much better to use the code in the HTTPError; for the requests.Timeout or requests.TooManyRedirects cases, you would need to use something else.  That said, I don\u0027t see why the client\u0027s consumer needs us to convert the exception; if they want to treat the Timeout or ConnectionError case specially, they can just import requests.","commit_id":"59da8d0189ea3d169116c161a7cb9dfab30fcfb4"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"6a8a4ed3b935b88b6898f815ef19ff11fe2e7791","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                            **kwargs)"},{"line_number":105,"context_line":"            except requests.HTTPError as e:"},{"line_number":106,"context_line":"                exception_message \u003d \"%s-%s\" % (e.__class__.__name__, str(e))"},{"line_number":107,"context_line":"                raise exceptions.ClientException(500, exception_message)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"            except requests.Timeout as e:"},{"line_number":110,"context_line":"                exception_message \u003d \"%s-%s\" % (e.__class__.__name__, str(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_b766e0b8","line":107,"in_reply_to":"3afb71cf_737bfcf5","updated":"2015-06-10 16:03:15.000000000","message":"The requests.HTTPError should have the response code embedded in it; I think it\u0027s the \u0027status_code\u0027 attribute, but it should be easy to look up in the requests documentation.  My point on the requests.Timeout and requests.TooManyRedirects is that ClientException is the wrong thing to throw, because there is no appropriate status code; you need to throw a completely different exception for those cases.","commit_id":"59da8d0189ea3d169116c161a7cb9dfab30fcfb4"},{"author":{"_account_id":13747,"name":"Kuo-tung Kao","email":"jelly.k@inwinstack.com","username":"coding1314"},"change_message_id":"d63e4e8186bb0bd7b224b0614409339a734fdf9b","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                            **kwargs)"},{"line_number":105,"context_line":"            except requests.HTTPError as e:"},{"line_number":106,"context_line":"                exception_message \u003d \"%s-%s\" % (e.__class__.__name__, str(e))"},{"line_number":107,"context_line":"                raise exceptions.ClientException(500, exception_message)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"            except requests.Timeout as e:"},{"line_number":110,"context_line":"                exception_message \u003d \"%s-%s\" % (e.__class__.__name__, str(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_737bfcf5","line":107,"in_reply_to":"3afb71cf_7f22ac53","updated":"2015-06-10 02:35:44.000000000","message":"requests.Timeout maybe use the code, 408. But I don\u0027t find any good http code   for requests.HTTPError and requests.TooManyRedirects. Should I create new exception for it? By the way, I can trace the requests source code to find why  the exception raised to generate more details if you think we need to do.","commit_id":"59da8d0189ea3d169116c161a7cb9dfab30fcfb4"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"00ab00aedefdf62d46e4041219b55830cdd588fe","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        # keystoneclient, where we need to raise the novaclient errors."},{"line_number":96,"context_line":"        raise_exc \u003d kwargs.pop(\u0027raise_exc\u0027, True)"},{"line_number":97,"context_line":"        with utils.record_time(self.times, self.timings, method, url):"},{"line_number":98,"context_line":"            try:"},{"line_number":99,"context_line":"                resp, body \u003d super(SessionClient, self).request("},{"line_number":100,"context_line":"                    url, method, raise_exc\u003dFalse, **kwargs)"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_00baa46e","line":98,"updated":"2015-07-13 13:07:34.000000000","message":"Since L102-114 and L389-400 are equal, It would be better to move it to separate function or context manager.","commit_id":"aacf9bb5dcd6a33b19665925b704ba4e2a5dca79"}]}
