)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"012403cd9974dc605bc3eaaeee255b59fd9dbd86","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Remove tmp bitstream file always"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"On fpga program, we will download a bitstream file from glance"},{"line_number":10,"context_line":"to a tmp local file. And no matter driver.program is success"},{"line_number":11,"context_line":"or failed, the tmp local file should be removed"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ic7be96f3f6da9cf366224401bc330485e67fedf1"},{"line_number":14,"context_line":"Signed-off-by: guolei \u003cguolei_yewu@cmss.chinamobile.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f65232a_8a556653","line":11,"range":{"start_line":10,"start_character":21,"end_line":11,"end_character":47},"updated":"2020-10-26 08:21:52.000000000","message":"Your description and your changing seem to be inconsistent, after your change, it will be remove tmp local file when programing failed.","commit_id":"2b50fd9595367ca1999fa3b68cc3b89c5ff19ba3"},{"author":{"_account_id":17843,"name":"guolei","email":"guolei_yewu@cmss.chinamobile.com","username":"guolei"},"change_message_id":"f50a8ff21ac1b5a13c5b204268ca13ad2b8bfe7f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Remove tmp bitstream file always"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"On fpga program, we will download a bitstream file from glance"},{"line_number":10,"context_line":"to a tmp local file. And no matter driver.program is success"},{"line_number":11,"context_line":"or failed, the tmp local file should be removed"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ic7be96f3f6da9cf366224401bc330485e67fedf1"},{"line_number":14,"context_line":"Signed-off-by: guolei \u003cguolei_yewu@cmss.chinamobile.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f65232a_2b036d11","line":11,"range":{"start_line":10,"start_character":21,"end_line":11,"end_character":47},"in_reply_to":"3f65232a_8a556653","updated":"2020-10-27 02:45:53.000000000","message":"I am not really understand, with try...finaly grammer, no matter exception is happened or not, code in finaly will be executed, it\u0027s not just programing failed will do cleanup.","commit_id":"2b50fd9595367ca1999fa3b68cc3b89c5ff19ba3"}],"cyborg/agent/manager.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"34157207f7ddf18db1c48b28c79d50ca4695cdb9","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            driver \u003d self.fpga_driver.create(driver_name)"},{"line_number":72,"context_line":"            ret \u003d driver.program(controlpath_id, download_path.name)"},{"line_number":73,"context_line":"            LOG.info(\u0027Driver program() API returned %s\u0027, ret)"},{"line_number":74,"context_line":"        finally:"},{"line_number":75,"context_line":"            LOG.debug(\u0027Remove tmp bitstream file: %s\u0027, download_path.name)"},{"line_number":76,"context_line":"            os.remove(download_path.name)"},{"line_number":77,"context_line":"        return ret"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_b65d20eb","line":74,"range":{"start_line":74,"start_character":8,"end_line":74,"end_character":15},"updated":"2020-10-27 03:42:08.000000000","message":"ah, sorry, it\u0027s finally not *except*.\n\nBut why we add try ... finally, what different from before? and what benefits can it bring us？","commit_id":"2b50fd9595367ca1999fa3b68cc3b89c5ff19ba3"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"64976401115f8d6c4dbfc451aafd5aedbcde164a","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            driver \u003d self.fpga_driver.create(driver_name)"},{"line_number":72,"context_line":"            ret \u003d driver.program(controlpath_id, download_path.name)"},{"line_number":73,"context_line":"            LOG.info(\u0027Driver program() API returned %s\u0027, ret)"},{"line_number":74,"context_line":"        finally:"},{"line_number":75,"context_line":"            LOG.debug(\u0027Remove tmp bitstream file: %s\u0027, download_path.name)"},{"line_number":76,"context_line":"            os.remove(download_path.name)"},{"line_number":77,"context_line":"        return ret"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_b1aeca95","line":74,"range":{"start_line":74,"start_character":8,"end_line":74,"end_character":15},"in_reply_to":"3f65232a_315f5a0f","updated":"2020-10-27 06:57:12.000000000","message":"\u003e Before, if driver.program raise a exception, the code below line 71\n \u003e will not be executed, it will raise a error to upper code directly,\n \u003e and on line 67, tmp local file had created and not be cleanup.\n \u003e Now, if driver.program raise a exception， code in finaly will be\n \u003e done first, it cleanup the tmp local file, and then raise a error\n \u003e to upper code.\n\nYep, it may exist the tmp file if create successful, and program() failed.","commit_id":"2b50fd9595367ca1999fa3b68cc3b89c5ff19ba3"},{"author":{"_account_id":17843,"name":"guolei","email":"guolei_yewu@cmss.chinamobile.com","username":"guolei"},"change_message_id":"3f23baa887035888b8188ac0d044ef83d1745d03","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            driver \u003d self.fpga_driver.create(driver_name)"},{"line_number":72,"context_line":"            ret \u003d driver.program(controlpath_id, download_path.name)"},{"line_number":73,"context_line":"            LOG.info(\u0027Driver program() API returned %s\u0027, ret)"},{"line_number":74,"context_line":"        finally:"},{"line_number":75,"context_line":"            LOG.debug(\u0027Remove tmp bitstream file: %s\u0027, download_path.name)"},{"line_number":76,"context_line":"            os.remove(download_path.name)"},{"line_number":77,"context_line":"        return ret"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_d1a54606","line":74,"range":{"start_line":74,"start_character":8,"end_line":74,"end_character":15},"in_reply_to":"3f65232a_315f5a0f","updated":"2020-10-27 06:05:24.000000000","message":"Update:\nit\u0027s line 72, ret \u003d driver.program(controlpath_id, download_path.name)\nin origin file, is line 71.","commit_id":"2b50fd9595367ca1999fa3b68cc3b89c5ff19ba3"},{"author":{"_account_id":17843,"name":"guolei","email":"guolei_yewu@cmss.chinamobile.com","username":"guolei"},"change_message_id":"627370d45b0eabf02884fbd02ea24c6460af8ff4","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            driver \u003d self.fpga_driver.create(driver_name)"},{"line_number":72,"context_line":"            ret \u003d driver.program(controlpath_id, download_path.name)"},{"line_number":73,"context_line":"            LOG.info(\u0027Driver program() API returned %s\u0027, ret)"},{"line_number":74,"context_line":"        finally:"},{"line_number":75,"context_line":"            LOG.debug(\u0027Remove tmp bitstream file: %s\u0027, download_path.name)"},{"line_number":76,"context_line":"            os.remove(download_path.name)"},{"line_number":77,"context_line":"        return ret"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_315f5a0f","line":74,"range":{"start_line":74,"start_character":8,"end_line":74,"end_character":15},"in_reply_to":"3f65232a_b65d20eb","updated":"2020-10-27 06:01:45.000000000","message":"Before, if driver.program raise a exception, the code below line 71 will not be executed, it will raise a error to upper code directly, and on line 67, tmp local file had created and not be cleanup.\nNow, if driver.program raise a exception， code in finaly will be done first, it cleanup the tmp local file, and then raise a error to upper code.","commit_id":"2b50fd9595367ca1999fa3b68cc3b89c5ff19ba3"}]}
