)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"cecc210f45b24065f8358ed4bd9402f87a5ecb0c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Béla Vancsics \u003cvancsics@inf.u-szeged.hu\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-01-20 14:24:56 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reduced the complexity of the send_cmd method"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The get_events method is very large - almost 140 lines,"},{"line_number":10,"context_line":"and McCabe\u0027s cyclomatic complexity 35."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a68dd71_b6afb693","line":7,"range":{"start_line":7,"start_character":25,"end_line":7,"end_character":26},"updated":"2016-01-20 13:35:28.000000000","message":"Could you add \u0027ProphetStor\u0027 to the commit message subject, please?","commit_id":"db34ddb46575f671d079b8baaaf7b6f9c0831ca2"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"9132f41580677a22e4a75ce0c04136596d944b47","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Reduced the complexity of the send_cmd method (in ProphetStor)"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The get_events method is very large - almost 140 lines,"},{"line_number":10,"context_line":"and McCabe\u0027s cyclomatic complexity 35."},{"line_number":11,"context_line":"(in cinder/volume/drivers/prophetstor/dplcommon.py)"},{"line_number":12,"context_line":"I extracted some of the functionalities into helper functions"},{"line_number":13,"context_line":"to reduce the length and complexity of send_cmd."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5aef4532_39a40456","line":10,"range":{"start_line":10,"start_character":3,"end_line":10,"end_character":37},"updated":"2016-03-07 16:56:06.000000000","message":"Suggest: \"... and has a McCabe\u0027s cyclomatic complexity score of 35.\"","commit_id":"b8d832da65e359f4ce74bb166519ff0eaafb82a4"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"9132f41580677a22e4a75ce0c04136596d944b47","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The get_events method is very large - almost 140 lines,"},{"line_number":10,"context_line":"and McCabe\u0027s cyclomatic complexity 35."},{"line_number":11,"context_line":"(in cinder/volume/drivers/prophetstor/dplcommon.py)"},{"line_number":12,"context_line":"I extracted some of the functionalities into helper functions"},{"line_number":13,"context_line":"to reduce the length and complexity of send_cmd."},{"line_number":14,"context_line":"Additionally it became more readable as well, without"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5aef4532_997718d4","line":11,"range":{"start_line":11,"start_character":0,"end_line":11,"end_character":51},"updated":"2016-03-07 16:56:06.000000000","message":"I don\u0027t think this is necessary since we can see by the patch where it is.","commit_id":"b8d832da65e359f4ce74bb166519ff0eaafb82a4"}],"cinder/volume/drivers/prophetstor/dplcommon.py":[{"author":{"_account_id":10439,"name":"Xi Yang","email":"yang.xi@99cloud.net","username":"phenom"},"change_message_id":"f9dbd781301b88c5df8998fa649795f79ed1a17e","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                                                     self.port,"},{"line_number":120,"context_line":"                                                     timeout\u003d60)"},{"line_number":121,"context_line":"            retry -\u003d 1"},{"line_number":122,"context_line":"            if connection:"},{"line_number":123,"context_line":"                if retry \u003d\u003d 0:"},{"line_number":124,"context_line":"                    retcode \u003d errno.ENOTCONN"},{"line_number":125,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_de35a9a8","line":122,"updated":"2015-11-30 14:17:27.000000000","message":"This if-else section could be simplified:\n\nif connection and retry:\n    retcode \u003d 0\nelse:\n   retcode \u003d errno.ENOTCONN","commit_id":"29618af5563b48854198f016f8a271b18df380fa"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"cecc210f45b24065f8358ed4bd9402f87a5ecb0c","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        return (_payload, _retcode)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _conn_set(self):"},{"line_number":91,"context_line":"        \"\"\"Connection setting\"\"\""},{"line_number":92,"context_line":"        for i in range(CONNECTION_RETRY):"},{"line_number":93,"context_line":"            try:"},{"line_number":94,"context_line":"                connection \u003d http_client.HTTPSConnection(self.ip,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_36aae671","line":91,"updated":"2016-01-20 13:35:28.000000000","message":"This isn\u0027t really connection setting, it is connection making, or connecting... the semantic difference makes a difference to the readability IMO","commit_id":"db34ddb46575f671d079b8baaaf7b6f9c0831ca2"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"cecc210f45b24065f8358ed4bd9402f87a5ecb0c","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        return (response, connection, retcode, retry, _move_code)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def _unexp_resp(self, method, url, response, expected_status):"},{"line_number":166,"context_line":"        \"\"\"Unexpected response log\"\"\""},{"line_number":167,"context_line":"        LOG.error(_LE(\u0027%(method)s %(url)s unexpected response status: \u0027"},{"line_number":168,"context_line":"                      \u0027%(response)s (expects: %(expects)s).\u0027),"},{"line_number":169,"context_line":"                  {\u0027method\u0027: method,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_364666c0","line":166,"range":{"start_line":166,"start_character":11,"end_line":166,"end_character":21},"updated":"2016-01-20 13:35:28.000000000","message":"Again, this is not a helpful function name. _log_unexpected_resp(...) or similar?","commit_id":"db34ddb46575f671d079b8baaaf7b6f9c0831ca2"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"cecc210f45b24065f8358ed4bd9402f87a5ecb0c","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                                      self.password)).replace(\u0027\\n\u0027, \u0027\u0027)"},{"line_number":205,"context_line":"        header[\u0027Authorization\u0027] \u003d \u0027Basic %s\u0027 % auth"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        (payload, retcode) \u003d self._payload_settings(params)"},{"line_number":208,"context_line":"        (connection, retcode, move_code) \u003d self._conn_set()"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        retry \u003d CONNECTION_RETRY"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_367426fc","line":207,"updated":"2016-01-20 13:35:28.000000000","message":"retcode is ignored, so JSON encoding errors get eaten","commit_id":"db34ddb46575f671d079b8baaaf7b6f9c0831ca2"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"cecc210f45b24065f8358ed4bd9402f87a5ecb0c","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        header[\u0027Authorization\u0027] \u003d \u0027Basic %s\u0027 % auth"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        (payload, retcode) \u003d self._payload_settings(params)"},{"line_number":208,"context_line":"        (connection, retcode, move_code) \u003d self._conn_set()"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        retry \u003d CONNECTION_RETRY"},{"line_number":211,"context_line":"        while (connection and retry):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_f6cbee1c","line":208,"updated":"2016-01-20 13:35:28.000000000","message":"Again, no error checking","commit_id":"db34ddb46575f671d079b8baaaf7b6f9c0831ca2"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"9c68246207f37c4a2ed32cc9864ef67b2181aa6b","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        header[\u0027Authorization\u0027] \u003d \u0027Basic %s\u0027 % auth"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        # payload and return code settings"},{"line_number":225,"context_line":"        payload, retcode \u003d self._payload_settings(params)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        # connecting"},{"line_number":228,"context_line":"        connection, retcode, move_code \u003d self._conn_making()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_ee98056d","line":225,"updated":"2016-02-25 11:35:04.000000000","message":"If the `recode` here is overwritten anyway at line 228, why need it?","commit_id":"4f814804a4ce9e6bb5e0fc05bf7cbaa1264b00bc"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"9c68246207f37c4a2ed32cc9864ef67b2181aa6b","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        payload, retcode \u003d self._payload_settings(params)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        # connecting"},{"line_number":228,"context_line":"        connection, retcode, move_code \u003d self._conn_making()"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"        retry \u003d CONNECTION_RETRY"},{"line_number":231,"context_line":"        while (connection and retry):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_2ecaed4f","line":228,"updated":"2016-02-25 11:35:04.000000000","message":"self._conn_making returns 2 values, but here we take 3?","commit_id":"4f814804a4ce9e6bb5e0fc05bf7cbaa1264b00bc"},{"author":{"_account_id":18462,"name":"Rahul U Nair","email":"rahulunair@gmail.com","username":"rahulunair"},"change_message_id":"99efb222e2433f1b850a3122a308fbe952d6c42e","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            try:"},{"line_number":81,"context_line":"                payload \u003d json.dumps(params, ensure_ascii\u003dFalse)"},{"line_number":82,"context_line":"                payload.encode(\u0027utf-8\u0027)"},{"line_number":83,"context_line":"            except Exception as e:"},{"line_number":84,"context_line":"                LOG.error(_LE(\u0027JSON encode params %(param)s error:\u0027"},{"line_number":85,"context_line":"                              \u0027 %(status)s.\u0027), {\u0027param\u0027: params, \u0027status\u0027: e})"},{"line_number":86,"context_line":"                retcode \u003d errno.EINVAL"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_13e0a428","line":83,"range":{"start_line":83,"start_character":19,"end_line":83,"end_character":28},"updated":"2016-07-29 23:36:40.000000000","message":"Will an exception not raised on serializing to json?","commit_id":"0946d637fea0a4a514d1a4eb2f600b08d3459324"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"4dc5b2c2eb5ba7c8d4a11cb37b002cde2eda1191","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        \"\"\"Connection making\"\"\""},{"line_number":92,"context_line":"        for i in range(CONNECTION_RETRY):"},{"line_number":93,"context_line":"            try:"},{"line_number":94,"context_line":"                connection \u003d http_client.HTTPSConnection(self.ip,"},{"line_number":95,"context_line":"                                                         self.port,"},{"line_number":96,"context_line":"                                                         timeout\u003d60)"},{"line_number":97,"context_line":"                if connection:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_4589cf25","line":94,"updated":"2016-07-29 13:09:23.000000000","message":"Why there is no sleep between connection re-attempts?","commit_id":"0946d637fea0a4a514d1a4eb2f600b08d3459324"},{"author":{"_account_id":18462,"name":"Rahul U Nair","email":"rahulunair@gmail.com","username":"rahulunair"},"change_message_id":"99efb222e2433f1b850a3122a308fbe952d6c42e","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        \"\"\"Connection making\"\"\""},{"line_number":92,"context_line":"        for i in range(CONNECTION_RETRY):"},{"line_number":93,"context_line":"            try:"},{"line_number":94,"context_line":"                connection \u003d http_client.HTTPSConnection(self.ip,"},{"line_number":95,"context_line":"                                                         self.port,"},{"line_number":96,"context_line":"                                                         timeout\u003d60)"},{"line_number":97,"context_line":"                if connection:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_1399c4c4","line":94,"in_reply_to":"bacf61ea_4589cf25","updated":"2016-07-29 23:36:40.000000000","message":"+1","commit_id":"0946d637fea0a4a514d1a4eb2f600b08d3459324"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"4dc5b2c2eb5ba7c8d4a11cb37b002cde2eda1191","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            connection \u003d http_client.HTTPSConnection(self.ip,"},{"line_number":119,"context_line":"                                                     self.port,"},{"line_number":120,"context_line":"                                                     timeout\u003d60)"},{"line_number":121,"context_line":"            retry -\u003d 1"},{"line_number":122,"context_line":"            if connection and retry:"},{"line_number":123,"context_line":"                retcode \u003d 0"},{"line_number":124,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_65021371","line":121,"updated":"2016-07-29 13:09:23.000000000","message":"Managing retry count within this function makes the code less readable. Can we return the appropriate code here and let the caller decrement the retry count if needed?","commit_id":"0946d637fea0a4a514d1a4eb2f600b08d3459324"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"4dc5b2c2eb5ba7c8d4a11cb37b002cde2eda1191","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            if response.status \u003d\u003d http_client.SERVICE_UNAVAILABLE:"},{"line_number":141,"context_line":"                LOG.error(_LE(\u0027The Flexvisor service is unavailable.\u0027))"},{"line_number":142,"context_line":"                time.sleep(1)"},{"line_number":143,"context_line":"                retry -\u003d 1"},{"line_number":144,"context_line":"                retcode \u003d errno.ENOPROTOOPT"},{"line_number":145,"context_line":"                # \"continue-code\""},{"line_number":146,"context_line":"                move_code \u003d 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_054b57ca","line":143,"updated":"2016-07-29 13:09:23.000000000","message":"same comment","commit_id":"0946d637fea0a4a514d1a4eb2f600b08d3459324"}]}
