)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"f5f0a6f52f88ce96d3fcb9e114fc3243b637ae1b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Type errors that are encountered whilst creating an"},{"line_number":10,"context_line":"image with an invalid body. This now responds with a"},{"line_number":11,"context_line":"400 \u0027Body format is invalid\u0027."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ieee0662f67c800b2b3c07c6a8b7877939cf9e1fe"},{"line_number":14,"context_line":"Closes-Bug: 1476695"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a50d1a3_64ffd367","line":12,"updated":"2015-07-21 16:04:42.000000000","message":"Probably needs both ApiImpact and DocImpact tags here.","commit_id":"7e934e8f8e851ea440e899f1ea4ba462c668fe39"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"5043307c760a5e32b8f1091537575caef4b12b03","unresolved":false,"context_lines":[{"line_number":13,"context_line":"ApiImpact"},{"line_number":14,"context_line":"DocImpact"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Partial-Bug: 1476695"},{"line_number":17,"context_line":"Partial-Bug: 1476253"},{"line_number":18,"context_line":"Change-Id: Ieee0662f67c800b2b3c07c6a8b7877939cf9e1fe"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7a2fa921_3ddab018","line":16,"updated":"2015-10-12 07:52:19.000000000","message":"May I know why you\u0027re using partial here? It looks like it closes both bugs but I might be missing something.","commit_id":"5fe30eaf4b08a201cf479196b4399f2bb2616e88"}],"glance/common/wsgi.py":[{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"943e9bf0602586aa38ac9782574f1423b8c5e320","unresolved":false,"context_lines":[{"line_number":790,"context_line":"        try:"},{"line_number":791,"context_line":"            jsondata \u003d jsonutils.loads(datastring, object_hook\u003dself._sanitizer)"},{"line_number":792,"context_line":"            if(not isinstance(jsondata, (dict, list))):"},{"line_number":793,"context_line":"                raise ValueError"},{"line_number":794,"context_line":"            return jsondata"},{"line_number":795,"context_line":"        except ValueError:"},{"line_number":796,"context_line":"            msg \u003d _(\u0027Malformed JSON in request body.\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_c1485d5e","line":793,"updated":"2015-08-04 08:53:00.000000000","message":"I think you should drop the parentheses:\n\nif not isinstance(...):","commit_id":"a83c406f3a84feaea6c478f291220d80043c60c1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e8853977369e0f5d338368f80719c371a4166679","unresolved":false,"context_lines":[{"line_number":786,"context_line":"        \"\"\"Sanitizer method that will be passed to jsonutils.loads.\"\"\""},{"line_number":787,"context_line":"        return obj"},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"    def from_json(self, datastring):"},{"line_number":790,"context_line":"        try:"},{"line_number":791,"context_line":"            jsondata \u003d jsonutils.loads(datastring, object_hook\u003dself._sanitizer)"},{"line_number":792,"context_line":"            if not isinstance(jsondata, (dict, list)):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a4dcd0f_fa2bb780","line":789,"updated":"2015-08-04 11:11:31.000000000","message":"This looks to be a general purpose string to json function that should work even in the case of non-dicts/non-lists.\n\nWould it be better for the dict/list check to happen in the \u0027default\u0027 function below?","commit_id":"09422e8cf788a3b7d07ca358478e9784dc0d59d4"},{"author":{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},"change_message_id":"dc6b72f586cfed412b5f4fc94eae605a29243a65","unresolved":false,"context_lines":[{"line_number":786,"context_line":"        \"\"\"Sanitizer method that will be passed to jsonutils.loads.\"\"\""},{"line_number":787,"context_line":"        return obj"},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"    def from_json(self, datastring):"},{"line_number":790,"context_line":"        try:"},{"line_number":791,"context_line":"            jsondata \u003d jsonutils.loads(datastring, object_hook\u003dself._sanitizer)"},{"line_number":792,"context_line":"            if not isinstance(jsondata, (dict, list)):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a4dcd0f_f4129e56","line":789,"in_reply_to":"1a4dcd0f_fa2bb780","updated":"2015-08-05 14:08:05.000000000","message":"This only seems to be used to deserialize bodies. The general purpose function would be the jsonutils.loads.","commit_id":"09422e8cf788a3b7d07ca358478e9784dc0d59d4"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"12feeeb095e33d63c3ab3e96034cd224d83a8f28","unresolved":false,"context_lines":[{"line_number":790,"context_line":"        try:"},{"line_number":791,"context_line":"            jsondata \u003d jsonutils.loads(datastring, object_hook\u003dself._sanitizer)"},{"line_number":792,"context_line":"            if not isinstance(jsondata, (dict, list)):"},{"line_number":793,"context_line":"                raise ValueError"},{"line_number":794,"context_line":"            return jsondata"},{"line_number":795,"context_line":"        except ValueError:"},{"line_number":796,"context_line":"            msg \u003d _(\u0027Malformed JSON in request body.\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_ff55faf9","line":793,"updated":"2015-10-12 15:45:36.000000000","message":"I am wondering if we need to provide error info to the user.\nInstead of common msg \u003d \u0027Malformed JSON in request body.\u0027 We can pass more detailed info to the user.","commit_id":"c75e2eac721fe240bf7e73eac671d23d8c300e08"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"539e06166dce25bb89b36fa236fd804dba94f2d5","unresolved":false,"context_lines":[{"line_number":790,"context_line":"        try:"},{"line_number":791,"context_line":"            jsondata \u003d jsonutils.loads(datastring, object_hook\u003dself._sanitizer)"},{"line_number":792,"context_line":"            if not isinstance(jsondata, (dict, list)):"},{"line_number":793,"context_line":"                raise ValueError"},{"line_number":794,"context_line":"            return jsondata"},{"line_number":795,"context_line":"        except ValueError:"},{"line_number":796,"context_line":"            msg \u003d _(\u0027Malformed JSON in request body.\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_de058014","line":793,"updated":"2015-10-13 08:57:00.000000000","message":"I like Kairat\u0027s suggestion. Something like: \"Expected dict/list and found $whatever\" would be great.","commit_id":"c75e2eac721fe240bf7e73eac671d23d8c300e08"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"baa8523cc8ad823527ef84bca12481f16900d057","unresolved":false,"context_lines":[{"line_number":791,"context_line":"            jsondata \u003d jsonutils.loads(datastring, object_hook\u003dself._sanitizer)"},{"line_number":792,"context_line":"            if not isinstance(jsondata, (dict, list)):"},{"line_number":793,"context_line":"                msg \u003d _(\u0027Unexpected body type. Expected list/dict.\u0027)"},{"line_number":794,"context_line":"                raise ValueError"},{"line_number":795,"context_line":"            return jsondata"},{"line_number":796,"context_line":"        except ValueError:"},{"line_number":797,"context_line":"            msg \u003d _(\u0027Malformed JSON in request body.\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a2ca52d_92dba4ed","line":794,"updated":"2015-10-13 15:48:34.000000000","message":"Seems you forgot to pass msg to ValueError. Should be ValueError(msg), right?","commit_id":"2e835ce35615afa6d8c2311a12cf1db1adaec354"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"7a054570f9d792906ae1ab6f3d25960fe29e24b5","unresolved":false,"context_lines":[{"line_number":791,"context_line":"            jsondata \u003d jsonutils.loads(datastring, object_hook\u003dself._sanitizer)"},{"line_number":792,"context_line":"            if not isinstance(jsondata, (dict, list)):"},{"line_number":793,"context_line":"                msg \u003d _(\u0027Unexpected body type. Expected list/dict.\u0027)"},{"line_number":794,"context_line":"                raise ValueError"},{"line_number":795,"context_line":"            return jsondata"},{"line_number":796,"context_line":"        except ValueError:"},{"line_number":797,"context_line":"            msg \u003d _(\u0027Malformed JSON in request body.\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a2ca52d_522f4ca1","line":794,"in_reply_to":"5a2ca52d_92dba4ed","updated":"2015-10-13 15:51:48.000000000","message":"And moreover, not ValueError, but \n\nraise webob.exc.HTTPBadRequest(explanation\u003dmsg)","commit_id":"2e835ce35615afa6d8c2311a12cf1db1adaec354"}],"glance/tests/functional/v2/test_images.py":[{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e8853977369e0f5d338368f80719c371a4166679","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        # Create image that tries to send a string should return 400"},{"line_number":583,"context_line":"        path \u003d self._url(\u0027/v2/images\u0027)"},{"line_number":584,"context_line":"        headers \u003d self._headers({\u0027content-type\u0027: \u0027application/json\u0027})"},{"line_number":585,"context_line":"        data \u003d jsonutils.dumps(\u0027hello\u0027)"},{"line_number":586,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":587,"context_line":"        self.assertEqual(400, response.status_code)"},{"line_number":588,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a4dcd0f_e5523c13","line":585,"updated":"2015-08-04 11:11:31.000000000","message":"Do we need to use jsonutils.dumps here?","commit_id":"09422e8cf788a3b7d07ca358478e9784dc0d59d4"}]}
