)]}'
{"nova/api/openstack/wsgi.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d0e4787e56380061049b8c9f750a27ab5858b888","unresolved":false,"context_lines":[{"line_number":1105,"context_line":"    @staticmethod"},{"line_number":1106,"context_line":"    def is_valid_body(body, entity_name):"},{"line_number":1107,"context_line":"        if not (body and entity_name in body):"},{"line_number":1108,"context_line":"            return False"},{"line_number":1109,"context_line":""},{"line_number":1110,"context_line":"        def is_dict(d):"},{"line_number":1111,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FavQ%3D","line":1108,"updated":"2012-09-12 20:03:51.000000000","message":"Would it make sense here to return an explanation of why the body is invalid, distinguishing between the lack of body and body[entity_name]? (for use in the explanation message in the 422 response)","commit_id":"99279dcc68a908d84646e23be215ec8a0be8f550"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"8ef430e51bfaadf5df32fdfaf5d6bb04e52a66e0","unresolved":false,"context_lines":[{"line_number":1105,"context_line":"    @staticmethod"},{"line_number":1106,"context_line":"    def is_valid_body(body, entity_name):"},{"line_number":1107,"context_line":"        if not (body and entity_name in body):"},{"line_number":1108,"context_line":"            return False"},{"line_number":1109,"context_line":""},{"line_number":1110,"context_line":"        def is_dict(d):"},{"line_number":1111,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FaF8%3D","line":1108,"in_reply_to":"AAAALH%2F%2FaJw%3D","updated":"2012-09-13 10:23:00.000000000","message":"Fair enough.","commit_id":"99279dcc68a908d84646e23be215ec8a0be8f550"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8add6e15f1d3f5126deb7691dd4901192103effd","unresolved":false,"context_lines":[{"line_number":1105,"context_line":"    @staticmethod"},{"line_number":1106,"context_line":"    def is_valid_body(body, entity_name):"},{"line_number":1107,"context_line":"        if not (body and entity_name in body):"},{"line_number":1108,"context_line":"            return False"},{"line_number":1109,"context_line":""},{"line_number":1110,"context_line":"        def is_dict(d):"},{"line_number":1111,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FaJw%3D","line":1108,"in_reply_to":"AAAALH%2F%2FavQ%3D","updated":"2012-09-13 08:41:40.000000000","message":"We weren\u0027t including an explanation in our 422s before and all I\u0027m doing is making sure we\u0027re returning 422s where were previously returned 500s\n\nSounds like a good idea for future improvement, though","commit_id":"99279dcc68a908d84646e23be215ec8a0be8f550"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d0e4787e56380061049b8c9f750a27ab5858b888","unresolved":false,"context_lines":[{"line_number":1115,"context_line":"                return False"},{"line_number":1116,"context_line":""},{"line_number":1117,"context_line":"        if not is_dict(body[entity_name]):"},{"line_number":1118,"context_line":"            return False"},{"line_number":1119,"context_line":""},{"line_number":1120,"context_line":"        return True"},{"line_number":1121,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FavU%3D","line":1118,"updated":"2012-09-12 20:03:51.000000000","message":"More concise (though less pythonic perhaps?) as:\n\n  if not isinstance(body[entity_name], dict):","commit_id":"99279dcc68a908d84646e23be215ec8a0be8f550"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"8ef430e51bfaadf5df32fdfaf5d6bb04e52a66e0","unresolved":false,"context_lines":[{"line_number":1115,"context_line":"                return False"},{"line_number":1116,"context_line":""},{"line_number":1117,"context_line":"        if not is_dict(body[entity_name]):"},{"line_number":1118,"context_line":"            return False"},{"line_number":1119,"context_line":""},{"line_number":1120,"context_line":"        return True"},{"line_number":1121,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FaGA%3D","line":1118,"in_reply_to":"AAAALH%2F%2FaJs%3D","updated":"2012-09-13 10:23:00.000000000","message":"Very enlightening link, thanks!","commit_id":"99279dcc68a908d84646e23be215ec8a0be8f550"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8add6e15f1d3f5126deb7691dd4901192103effd","unresolved":false,"context_lines":[{"line_number":1115,"context_line":"                return False"},{"line_number":1116,"context_line":""},{"line_number":1117,"context_line":"        if not is_dict(body[entity_name]):"},{"line_number":1118,"context_line":"            return False"},{"line_number":1119,"context_line":""},{"line_number":1120,"context_line":"        return True"},{"line_number":1121,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FaJs%3D","line":1118,"in_reply_to":"AAAALH%2F%2FavU%3D","updated":"2012-09-13 08:41:40.000000000","message":"Right, \"isinstance considered harmful\" - http://www.canonical.org/~kragen/isinstance/\n\ne.g. with duck typing, you don\u0027t care whether it\u0027s a dict just that it implements a dict-like interface","commit_id":"99279dcc68a908d84646e23be215ec8a0be8f550"}]}
