)]}'
{"nova/api/metadata/vendordata_dynamic.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"7a29244b309b49dff683329cbb7c1ac3d4ec8734","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            if res:"},{"line_number":100,"context_line":"                # TODO(mikal): Use the Cache-Control response header to do some"},{"line_number":101,"context_line":"                # sensible form of caching here."},{"line_number":102,"context_line":"                return jsonutils.loads(res.text)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"            return {}"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_c6753c32","line":102,"updated":"2017-02-25 13:00:58.000000000","message":"honestly, given that it\u0027s running in exception mode, you probably don\u0027t even need this conditional and can jump to the jsonutils.loads","commit_id":"a70f84dec9702545fd0c6c74579d827b87a5f41e"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"2e9b3cc262e4ffb725819703d54874a0d1956b3c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            if res:"},{"line_number":100,"context_line":"                # TODO(mikal): Use the Cache-Control response header to do some"},{"line_number":101,"context_line":"                # sensible form of caching here."},{"line_number":102,"context_line":"                return jsonutils.loads(res.text)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"            return {}"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_e64320ad","line":102,"in_reply_to":"da36d5c6_4634ec48","updated":"2017-02-25 13:21:06.000000000","message":"The reason I said you could even probably delete this bit is that by default the .request will throw an exception for any non success code. So I\u0027m pretty sure that \"if res:\" is the same as \"if True:\" given that it\u0027s running in default mode.","commit_id":"a70f84dec9702545fd0c6c74579d827b87a5f41e"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"8fdaeb7acf39e3ab67e99afbb55627938d16947b","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            if res:"},{"line_number":100,"context_line":"                # TODO(mikal): Use the Cache-Control response header to do some"},{"line_number":101,"context_line":"                # sensible form of caching here."},{"line_number":102,"context_line":"                return jsonutils.loads(res.text)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"            return {}"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_e6d5e0e4","line":102,"in_reply_to":"da36d5c6_c6753c32","updated":"2017-02-25 13:12:54.000000000","message":"Maybe, I am not that familiar with keystoneauth1 session. But it\u0027s usually good practice to check status_code. Also that was not the primary intent of this patch.","commit_id":"a70f84dec9702545fd0c6c74579d827b87a5f41e"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"57b7fdee4d5c2e4a650257a4c40d447c46c5b986","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            if res:"},{"line_number":100,"context_line":"                # TODO(mikal): Use the Cache-Control response header to do some"},{"line_number":101,"context_line":"                # sensible form of caching here."},{"line_number":102,"context_line":"                return jsonutils.loads(res.text)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"            return {}"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_e6dfa0d3","line":102,"in_reply_to":"da36d5c6_e64320ad","updated":"2017-02-25 13:41:39.000000000","message":"That\u0027s right: https://github.com/openstack/keystoneauth/blob/9365dbeb6d4ffb70d0e2ecf561fadbb3e150b23c/keystoneauth1/session.py#L652\n\nI didn\u0027t know that, lgtm.","commit_id":"a70f84dec9702545fd0c6c74579d827b87a5f41e"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"406ed9db4e0f555ba829fdaeeba797824e44c178","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            if res:"},{"line_number":100,"context_line":"                # TODO(mikal): Use the Cache-Control response header to do some"},{"line_number":101,"context_line":"                # sensible form of caching here."},{"line_number":102,"context_line":"                return jsonutils.loads(res.text)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"            return {}"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_e6ec00bd","line":102,"in_reply_to":"da36d5c6_e6d5e0e4","updated":"2017-02-25 13:17:41.000000000","message":"This does check the status code, because it\u0027s requests. Requests response evaluates to True if it\u0027s a success code.","commit_id":"a70f84dec9702545fd0c6c74579d827b87a5f41e"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"5c137c7462d464b4bbec6717b4452a144e4dc3a5","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            if res:"},{"line_number":100,"context_line":"                # TODO(mikal): Use the Cache-Control response header to do some"},{"line_number":101,"context_line":"                # sensible form of caching here."},{"line_number":102,"context_line":"                return jsonutils.loads(res.text)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"            return {}"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_4634ec48","line":102,"in_reply_to":"da36d5c6_e6ec00bd","updated":"2017-02-25 13:19:14.000000000","message":"https://github.com/openstack/nova/blob/f7ba74428f011fccd56d0bdd449652a6fc87cbec/nova/api/openstack/identity.py#L55-L68 is another example of this in tree.","commit_id":"a70f84dec9702545fd0c6c74579d827b87a5f41e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f0b3bf1e6dfed2f7e1c6638e295494c638d644af","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            res \u003d self.session.request(url, \u0027POST\u0027, data\u003djsonutils.dumps(body),"},{"line_number":97,"context_line":"                                       verify\u003dverify, headers\u003dheaders,"},{"line_number":98,"context_line":"                                       timeout\u003dtimeout)"},{"line_number":99,"context_line":"            if res:"},{"line_number":100,"context_line":"                # TODO(mikal): Use the Cache-Control response header to do some"},{"line_number":101,"context_line":"                # sensible form of caching here."},{"line_number":102,"context_line":"                return jsonutils.loads(res.text)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba2be162_845afe4e","line":99,"updated":"2017-03-01 18:46:58.000000000","message":"This actually breaks the 204 case because if there is no content, we still try to json load res.text below, which is going to blow up with a TypeError when None, or ValueError when empty string. This was missed in the tests because the mocked object doesn\u0027t override how requests.Response works.","commit_id":"b9587587c2f3d6f871dec07562c16e1d82bc05e6"}]}
