)]}'
{"dragonflow/conf/df_common_params.py":[{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"7a92e33f047da56fa3f28f762c83e08bedb06363","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                        \"dragonflow_datapath_allocation.json\")),"},{"line_number":190,"context_line":"    cfg.BoolOpt(\u0027overwrite_datapath_allocation_output_path\u0027,"},{"line_number":191,"context_line":"                help\u003d_(\"Overwrite datapath allocation data?\"),"},{"line_number":192,"context_line":"                default\u003dFalse),"},{"line_number":193,"context_line":"    # FIXME (dimak) rename to something simpler once all tables are"},{"line_number":194,"context_line":"    #               auto-allocated."},{"line_number":195,"context_line":"    cfg.IntOpt(\u0027datapath_autoalloc_table_offset\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f6a8fd7_a07e20ad","line":192,"range":{"start_line":192,"start_character":16,"end_line":192,"end_character":29},"updated":"2018-04-26 13:03:38.000000000","message":"I believe this should be true, as the system should always be consistent with itself.\nIf it is set to False, the controller is run once, the file is created and never overwritten.\nThis creates a situation in which future runs may display information that is misleading and incorrect (for anyone relying on this file).\nAnyone who disables it will do so understanding what they do and not as a default.","commit_id":"8194c36132f530213cee8f79b3e80ca9e9679fd6"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"43c6122870d54637226837f55457572f65635684","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                        \"dragonflow_datapath_allocation.json\")),"},{"line_number":190,"context_line":"    cfg.BoolOpt(\u0027overwrite_datapath_allocation_output_path\u0027,"},{"line_number":191,"context_line":"                help\u003d_(\"Overwrite datapath allocation data?\"),"},{"line_number":192,"context_line":"                default\u003dFalse),"},{"line_number":193,"context_line":"    # FIXME (dimak) rename to something simpler once all tables are"},{"line_number":194,"context_line":"    #               auto-allocated."},{"line_number":195,"context_line":"    cfg.IntOpt(\u0027datapath_autoalloc_table_offset\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f6a8fd7_4be085fb","line":192,"range":{"start_line":192,"start_character":16,"end_line":192,"end_character":29},"in_reply_to":"9f6a8fd7_a07e20ad","updated":"2018-04-26 13:15:26.000000000","message":"Done","commit_id":"8194c36132f530213cee8f79b3e80ca9e9679fd6"}],"dragonflow/controller/datapath.py":[{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"7a92e33f047da56fa3f28f762c83e08bedb06363","unresolved":false,"context_lines":[{"line_number":276,"context_line":"                not cfg.CONF.df.overwrite_datapath_allocation_output_path):"},{"line_number":277,"context_line":"            LOG.warning(\"File %s exists, but cannot overwrite\", dppath)"},{"line_number":278,"context_line":"            return"},{"line_number":279,"context_line":"        try:"},{"line_number":280,"context_line":"            f \u003d open(dppath, \u0027w\u0027)"},{"line_number":281,"context_line":"        except IOError:"},{"line_number":282,"context_line":"            LOG.exception(\"Cannot open file %s\", dppath)"},{"line_number":283,"context_line":"            return"},{"line_number":284,"context_line":"        try:"},{"line_number":285,"context_line":"            dp_allocs \u003d self._get_dp_allocs_basic_dictionary()"},{"line_number":286,"context_line":"            jsonutils.dump(dp_allocs, f)"},{"line_number":287,"context_line":"        finally:"},{"line_number":288,"context_line":"            f.close()"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def _get_dp_allocs_basic_dictionary(self):"},{"line_number":291,"context_line":"        return {key: self._dp_alloc_to_dict(value)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f6a8fd7_2039b0f1","line":288,"range":{"start_line":279,"start_character":8,"end_line":288,"end_character":21},"updated":"2018-04-26 13:03:38.000000000","message":"nit: Why not use the notation of \"with open(dppath, \u0027w\u0027) as f\" ?","commit_id":"8194c36132f530213cee8f79b3e80ca9e9679fd6"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"43c6122870d54637226837f55457572f65635684","unresolved":false,"context_lines":[{"line_number":276,"context_line":"                not cfg.CONF.df.overwrite_datapath_allocation_output_path):"},{"line_number":277,"context_line":"            LOG.warning(\"File %s exists, but cannot overwrite\", dppath)"},{"line_number":278,"context_line":"            return"},{"line_number":279,"context_line":"        try:"},{"line_number":280,"context_line":"            f \u003d open(dppath, \u0027w\u0027)"},{"line_number":281,"context_line":"        except IOError:"},{"line_number":282,"context_line":"            LOG.exception(\"Cannot open file %s\", dppath)"},{"line_number":283,"context_line":"            return"},{"line_number":284,"context_line":"        try:"},{"line_number":285,"context_line":"            dp_allocs \u003d self._get_dp_allocs_basic_dictionary()"},{"line_number":286,"context_line":"            jsonutils.dump(dp_allocs, f)"},{"line_number":287,"context_line":"        finally:"},{"line_number":288,"context_line":"            f.close()"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def _get_dp_allocs_basic_dictionary(self):"},{"line_number":291,"context_line":"        return {key: self._dp_alloc_to_dict(value)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f6a8fd7_4b2ba52f","line":288,"range":{"start_line":279,"start_character":8,"end_line":288,"end_character":21},"in_reply_to":"9f6a8fd7_2039b0f1","updated":"2018-04-26 13:15:26.000000000","message":"I think this way is safer if jsonutils.dump or _get_dp_allocs_basic_dictionary raise an exception.","commit_id":"8194c36132f530213cee8f79b3e80ca9e9679fd6"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"106f5d3b9ad6127cc272e6effd9700f2427d4928","unresolved":false,"context_lines":[{"line_number":276,"context_line":"                not cfg.CONF.df.overwrite_datapath_allocation_output_path):"},{"line_number":277,"context_line":"            LOG.warning(\"File %s exists, but cannot overwrite\", dppath)"},{"line_number":278,"context_line":"            return"},{"line_number":279,"context_line":"        try:"},{"line_number":280,"context_line":"            f \u003d open(dppath, \u0027w\u0027)"},{"line_number":281,"context_line":"        except IOError:"},{"line_number":282,"context_line":"            LOG.exception(\"Cannot open file %s\", dppath)"},{"line_number":283,"context_line":"            return"},{"line_number":284,"context_line":"        try:"},{"line_number":285,"context_line":"            dp_allocs \u003d self._get_dp_allocs_basic_dictionary()"},{"line_number":286,"context_line":"            jsonutils.dump(dp_allocs, f)"},{"line_number":287,"context_line":"        finally:"},{"line_number":288,"context_line":"            f.close()"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def _get_dp_allocs_basic_dictionary(self):"},{"line_number":291,"context_line":"        return {key: self._dp_alloc_to_dict(value)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f6a8fd7_8b8d3d33","line":288,"range":{"start_line":279,"start_character":8,"end_line":288,"end_character":21},"in_reply_to":"9f6a8fd7_4b2ba52f","updated":"2018-04-26 13:21:03.000000000","message":"I agree that if there is an exception in the open it is safer, but the contract of \"with\" is that it will call the close anyway...\nhthttps://docs.python.org/3/reference/compound_stmts.html#withtp://www.pythonforbeginners.com/files/with-statement-in-python","commit_id":"8194c36132f530213cee8f79b3e80ca9e9679fd6"}]}
