)]}'
{"neutron/agent/l3/agent.py":[{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"b9896b9d23c18d637b2ee4dab031cadc8a534709","unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        try:"},{"line_number":339,"context_line":"            ri.initialize(self.process_monitor)"},{"line_number":340,"context_line":"        except Exception:"},{"line_number":341,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":342,"context_line":"                removed \u003d self._safe_router_removed(router_id)"},{"line_number":343,"context_line":"                if not removed:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_56f8a6e5","line":340,"updated":"2015-11-09 07:55:15.000000000","message":"You should catch only needed Exception, not all.","commit_id":"ac9c0b0b6b78c467b701c3bc6c8b8c536ef64931"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"7fb5f307af756c06a45a85cab3a5204b6e524aac","unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        try:"},{"line_number":339,"context_line":"            ri.initialize(self.process_monitor)"},{"line_number":340,"context_line":"        except Exception:"},{"line_number":341,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":342,"context_line":"                removed \u003d self._safe_router_removed(router_id)"},{"line_number":343,"context_line":"                if not removed:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_39eceec6","line":340,"in_reply_to":"da85f559_56f8a6e5","updated":"2015-11-09 10:18:08.000000000","message":"Although it is only one type of exception here now, the idea to use Exception here can be general for all cases that needs rollback. So, I think Exception is ok here. Pls let me know your further comment.","commit_id":"ac9c0b0b6b78c467b701c3bc6c8b8c536ef64931"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"b9896b9d23c18d637b2ee4dab031cadc8a534709","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        try:"},{"line_number":339,"context_line":"            ri.initialize(self.process_monitor)"},{"line_number":340,"context_line":"        except Exception:"},{"line_number":341,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":342,"context_line":"                removed \u003d self._safe_router_removed(router_id)"},{"line_number":343,"context_line":"                if not removed:"},{"line_number":344,"context_line":"                    del self.router_info[router_id]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_16c21e86","line":341,"updated":"2015-11-09 07:55:15.000000000","message":"Better idea is to use nested context because if _safe_router_removed will throw an exception it will be impossible to handle it","commit_id":"ac9c0b0b6b78c467b701c3bc6c8b8c536ef64931"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"7fb5f307af756c06a45a85cab3a5204b6e524aac","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        try:"},{"line_number":339,"context_line":"            ri.initialize(self.process_monitor)"},{"line_number":340,"context_line":"        except Exception:"},{"line_number":341,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":342,"context_line":"                removed \u003d self._safe_router_removed(router_id)"},{"line_number":343,"context_line":"                if not removed:"},{"line_number":344,"context_line":"                    del self.router_info[router_id]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_b9c53e5c","line":341,"in_reply_to":"da85f559_16c21e86","updated":"2015-11-09 10:18:08.000000000","message":"I think the prefix \"_safe\" will prevent it from throwing exception.","commit_id":"ac9c0b0b6b78c467b701c3bc6c8b8c536ef64931"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"7616fbeea50c9be50abbe51b651173b667818d5e","unresolved":false,"context_lines":[{"line_number":343,"context_line":"                removed \u003d self._safe_router_removed(router_id)"},{"line_number":344,"context_line":"                if not removed:"},{"line_number":345,"context_line":"                    del self.router_info[router_id]"},{"line_number":346,"context_line":"        else:"},{"line_number":347,"context_line":"            # TODO(Carl) This is a hook in to fwaas.  It should be cleaned up."},{"line_number":348,"context_line":"            self.process_router_add(ri)"},{"line_number":349,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_023d258e","line":346,"updated":"2016-01-07 08:44:51.000000000","message":"This else clause is unnecesarry. The except statement will always reraise so the code after the try block can only be reached after success anyway.","commit_id":"87b1cc827fb62a4366aa04a335389cbd445328fe"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"73a12e6f6f3b23f4646c6fac44e3d8df848ac2df","unresolved":false,"context_lines":[{"line_number":439,"context_line":""},{"line_number":440,"context_line":"    def _process_added_router(self, router):"},{"line_number":441,"context_line":"        self._router_added(router[\u0027id\u0027], router)"},{"line_number":442,"context_line":"        ri \u003d self.router_info[router[\u0027id\u0027]]"},{"line_number":443,"context_line":"        ri.router \u003d router"},{"line_number":444,"context_line":"        ri.process(self)"},{"line_number":445,"context_line":"        registry.notify(resources.ROUTER, events.AFTER_CREATE, self, router\u003dri)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a7b0d38_dddb4aec","line":442,"range":{"start_line":442,"start_character":18,"end_line":442,"end_character":29},"updated":"2015-12-23 13:59:47.000000000","message":"Router info is deleted in code line #L343 you added. So here will get keyerror.","commit_id":"87b1cc827fb62a4366aa04a335389cbd445328fe"}],"neutron/tests/unit/agent/l3/test_agent.py":[{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"b9896b9d23c18d637b2ee4dab031cadc8a534709","unresolved":false,"context_lines":[{"line_number":1733,"context_line":""},{"line_number":1734,"context_line":"        self.assertTrue(agent.fullsync)"},{"line_number":1735,"context_line":"        agent._safe_router_removed.assert_called_once_with(router[\u0027id\u0027])"},{"line_number":1736,"context_line":"        self.assertFalse(router[\u0027id\u0027] in agent.router_info)"},{"line_number":1737,"context_line":"        self.assertFalse(router_processor.fetched_and_processed.called)"},{"line_number":1738,"context_line":""},{"line_number":1739,"context_line":"    def test_destroy_namespace(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_561426f4","line":1736,"updated":"2015-11-09 07:55:15.000000000","message":"assertIn","commit_id":"ac9c0b0b6b78c467b701c3bc6c8b8c536ef64931"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"7fb5f307af756c06a45a85cab3a5204b6e524aac","unresolved":false,"context_lines":[{"line_number":1733,"context_line":""},{"line_number":1734,"context_line":"        self.assertTrue(agent.fullsync)"},{"line_number":1735,"context_line":"        agent._safe_router_removed.assert_called_once_with(router[\u0027id\u0027])"},{"line_number":1736,"context_line":"        self.assertFalse(router[\u0027id\u0027] in agent.router_info)"},{"line_number":1737,"context_line":"        self.assertFalse(router_processor.fetched_and_processed.called)"},{"line_number":1738,"context_line":""},{"line_number":1739,"context_line":"    def test_destroy_namespace(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_5988d222","line":1736,"in_reply_to":"da85f559_561426f4","updated":"2015-11-09 10:18:08.000000000","message":"Done","commit_id":"ac9c0b0b6b78c467b701c3bc6c8b8c536ef64931"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"73a12e6f6f3b23f4646c6fac44e3d8df848ac2df","unresolved":false,"context_lines":[{"line_number":1719,"context_line":""},{"line_number":1720,"context_line":"        update \u003d mock.Mock()"},{"line_number":1721,"context_line":"        update.router_id \u003d router[\u0027id\u0027]"},{"line_number":1722,"context_line":"        update.router \u003d None"},{"line_number":1723,"context_line":""},{"line_number":1724,"context_line":"        router_processor \u003d mock.Mock()"},{"line_number":1725,"context_line":"        agent._queue \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a7b0d38_9d9382fa","line":1722,"range":{"start_line":1722,"start_character":15,"end_line":1722,"end_character":21},"updated":"2015-12-23 13:59:47.000000000","message":"This means a delete \"update\" in queue. so you just do not test what you want.","commit_id":"87b1cc827fb62a4366aa04a335389cbd445328fe"}]}
