)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"7ecf8351a6da67ae0482ce416df5ba308cc7b8cb","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Strip json and html from error messages"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"refer:https://review.openstack.org/#/c/148387/"},{"line_number":10,"context_line":"And update the ingore for *.wap file"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Iac14e8b1950934827964de02a0d7e893cfce303e"},{"line_number":13,"context_line":"Close-Bug: #1490378"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da20952f_9a630942","line":10,"updated":"2015-08-31 13:34:43.000000000","message":"Let\u0027s move this to a separate commit please?","commit_id":"8f1895cabe6e4d80bf151c4fc4461c05eb9e4417"}],"muranoclient/common/exceptions.py":[{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"9ec7d88f2fc74b76108159d655b37add7481a831","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    \"\"\"Return an instance of an HTTPException based on httplib response.\"\"\""},{"line_number":154,"context_line":"    cls \u003d _code_map.get(response.status_code, HTTPException)"},{"line_number":155,"context_line":"    body \u003d response.content"},{"line_number":156,"context_line":"    if body and \u0027json\u0027 in response.headers[\u0027content-type\u0027]:"},{"line_number":157,"context_line":"        # Iterate over the nested objects and retreive the \"message\" attribute."},{"line_number":158,"context_line":"        messages \u003d [obj.get(\u0027message\u0027) for obj in response.json().values()]"},{"line_number":159,"context_line":"        # Join all of the messages together nicely and filter out any objects"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_a1258709","line":156,"updated":"2015-08-31 12:02:44.000000000","message":"this is not good enough test, I\u0027d rather test\n\n response.headers[\u0027content-type\u0027]\u003d\u0027application/json\u0027\n\notherwise you\u0027re risking on catching a bit to broad typo of errors.","commit_id":"dd288a191599ef520123ebe5133de0ffd062541f"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"9ec7d88f2fc74b76108159d655b37add7481a831","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        # that don\u0027t have a \"message\" attr."},{"line_number":161,"context_line":"        details \u003d \u0027\\n\u0027.join(i for i in messages if i is not None)"},{"line_number":162,"context_line":"        return cls(details\u003ddetails)"},{"line_number":163,"context_line":"    elif body and \u0027html\u0027 in response.headers[\u0027content-type\u0027]:"},{"line_number":164,"context_line":"        # Split the lines, strip whitespace and inline HTML from the response."},{"line_number":165,"context_line":"        details \u003d [re.sub(r\u0027\u003c.+?\u003e\u0027, \u0027\u0027, i.strip())"},{"line_number":166,"context_line":"                   for i in response.text.splitlines()]"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_611befca","line":163,"updated":"2015-08-31 12:02:44.000000000","message":"same here. let\u0027s check against specific content type.","commit_id":"dd288a191599ef520123ebe5133de0ffd062541f"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"9ec7d88f2fc74b76108159d655b37add7481a831","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        # Remove duplicates from the list."},{"line_number":169,"context_line":"        details_seen \u003d set()"},{"line_number":170,"context_line":"        details_temp \u003d []"},{"line_number":171,"context_line":"        for i in details:"},{"line_number":172,"context_line":"            if i not in details_seen:"},{"line_number":173,"context_line":"                details_temp.append(i)"},{"line_number":174,"context_line":"                details_seen.add(i)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_a153476a","line":171,"updated":"2015-08-31 12:02:44.000000000","message":"this is sub optimal.\n\njust use a set comprehension https://docs.python.org/2/tutorial/datastructures.html#sets","commit_id":"dd288a191599ef520123ebe5133de0ffd062541f"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"7ecf8351a6da67ae0482ce416df5ba308cc7b8cb","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        # that don\u0027t have a \"message\" attr."},{"line_number":161,"context_line":"        details \u003d \u0027\\n\u0027.join(i for i in messages if i is not None)"},{"line_number":162,"context_line":"        return cls(details\u003ddetails)"},{"line_number":163,"context_line":"    elif body and response.headers[\u0027content-type\u0027].lower().startswith(\"text/html\"):"},{"line_number":164,"context_line":"        # Split the lines, strip whitespace and inline HTML from the response."},{"line_number":165,"context_line":"        details \u003d [re.sub(r\u0027\u003c.+?\u003e\u0027, \u0027\u0027, i.strip())"},{"line_number":166,"context_line":"                   for i in response.text.splitlines()]"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_3a3e7d28","line":163,"updated":"2015-08-31 13:34:43.000000000","message":"let\u0027s be consistent here. and test\n\n response.headers[\u0027content-type\u0027] \u003d\u003d \u0027text/html\u0027\n\nwon\u0027t we?","commit_id":"8f1895cabe6e4d80bf151c4fc4461c05eb9e4417"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"7ecf8351a6da67ae0482ce416df5ba308cc7b8cb","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        # Split the lines, strip whitespace and inline HTML from the response."},{"line_number":165,"context_line":"        details \u003d [re.sub(r\u0027\u003c.+?\u003e\u0027, \u0027\u0027, i.strip())"},{"line_number":166,"context_line":"                   for i in response.text.splitlines()]"},{"line_number":167,"context_line":"        details \u003d {i for i in details if i}"},{"line_number":168,"context_line":"        details \u003d \u0027: \u0027.join(details)"},{"line_number":169,"context_line":"        return cls(details\u003ddetails)"},{"line_number":170,"context_line":"    elif body:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_3a6c3d34","line":167,"updated":"2015-08-31 13:34:43.000000000","message":"python 2.6 would fail here unfortunatelly. you\u0027d have to use something like\n\n  details \u003d set([i for i in details if i])","commit_id":"8f1895cabe6e4d80bf151c4fc4461c05eb9e4417"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"7289b95554369de986c2f04fdfd3d97095871049","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    \"\"\"Return an instance of an HTTPException based on httplib response.\"\"\""},{"line_number":154,"context_line":"    cls \u003d _code_map.get(response.status_code, HTTPException)"},{"line_number":155,"context_line":"    body \u003d response.content"},{"line_number":156,"context_line":"    if body and response.headers[\u0027content-type\u0027] \u003d\u003d \u0027application/json\u0027:"},{"line_number":157,"context_line":"        # Iterate over the nested objects and retreive the \"message\" attribute."},{"line_number":158,"context_line":"        messages \u003d [obj.get(\u0027message\u0027) for obj in response.json().values()]"},{"line_number":159,"context_line":"        # Join all of the messages together nicely and filter out any objects"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_66569c07","line":156,"updated":"2015-08-31 14:35:01.000000000","message":"what do you think about checking .lower().startswith(\"application/json\") here too?","commit_id":"b17792f5b879c01a05d7e6c87ed6efd69736e6c3"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"e3957dbadebd07e91cb35661b5dbc49f1e75cc68","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        _code_map[obj.code] \u003d obj"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"def from_response(response, body\u003dNone):"},{"line_number":153,"context_line":"    \"\"\"Return an instance of an HTTPException based on httplib response.\"\"\""},{"line_number":154,"context_line":"    cls \u003d _code_map.get(response.status_code, HTTPException)"},{"line_number":155,"context_line":"    body \u003d response.content"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_79cda75c","line":152,"updated":"2015-09-01 13:55:22.000000000","message":"pls remove this body\u003dNone\n\nit is overriden later in the code by \n\n body \u003d response.content\n\nWill +2 after that.","commit_id":"fd7968b72cecb05f9d235ca364d3aa433c7cff8c"}],"muranoclient/tests/unit/test_exc.py":[{"author":{"_account_id":13149,"name":"Dmytro Dovbii","email":"dmanddov@gmail.com","username":"Ddovbii"},"change_message_id":"c6523c42f2ef39ed838bc7a357496997a056413e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_8fa1ae48","line":1,"updated":"2015-09-04 11:29:13.000000000","message":"please fix year","commit_id":"5965291de752e89af074c92907e1c828fde21f54"}]}
