)]}'
{"neutron/api/v2/base.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"352d3338f97b44cfdfa6356d159709ac6c316ad3","unresolved":false,"context_lines":[{"line_number":440,"context_line":"    def _create(self, request, body, **kwargs):"},{"line_number":441,"context_line":"        \"\"\"Creates a new instance of the requested entity.\"\"\""},{"line_number":442,"context_line":"        parent_id \u003d kwargs.get(self._parent_id_name)"},{"line_number":443,"context_line":"        try:"},{"line_number":444,"context_line":"            body \u003d Controller.prepare_request_body("},{"line_number":445,"context_line":"                request.context, body, True, self._resource, self._attr_info,"},{"line_number":446,"context_line":"                allow_bulk\u003dself._allow_bulk)"},{"line_number":447,"context_line":"        except Exception as e:"},{"line_number":448,"context_line":"            LOG.warning(\"An exception happened while processing the request \""},{"line_number":449,"context_line":"                        \"body. The exception message is [%s].\", e)"},{"line_number":450,"context_line":"            raise e"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"        action \u003d self._plugin_handlers[self.CREATE]"},{"line_number":453,"context_line":"        # Check authz"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_cad99d56","line":450,"range":{"start_line":443,"start_character":0,"end_line":450,"end_character":19},"updated":"2020-08-24 12:28:59.000000000","message":"Doesn\u0027t it print several times the same warning as the same is catched in prepare_request_body and reraised?","commit_id":"2f0c352973ebd7d062f4d1818adb8e05093169f1"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"121ee005e2893671fcc4ce2f5603942b6bc23efa","unresolved":false,"context_lines":[{"line_number":440,"context_line":"    def _create(self, request, body, **kwargs):"},{"line_number":441,"context_line":"        \"\"\"Creates a new instance of the requested entity.\"\"\""},{"line_number":442,"context_line":"        parent_id \u003d kwargs.get(self._parent_id_name)"},{"line_number":443,"context_line":"        try:"},{"line_number":444,"context_line":"            body \u003d Controller.prepare_request_body("},{"line_number":445,"context_line":"                request.context, body, True, self._resource, self._attr_info,"},{"line_number":446,"context_line":"                allow_bulk\u003dself._allow_bulk)"},{"line_number":447,"context_line":"        except Exception as e:"},{"line_number":448,"context_line":"            LOG.warning(\"An exception happened while processing the request \""},{"line_number":449,"context_line":"                        \"body. The exception message is [%s].\", e)"},{"line_number":450,"context_line":"            raise e"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"        action \u003d self._plugin_handlers[self.CREATE]"},{"line_number":453,"context_line":"        # Check authz"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_3e605acf","line":450,"range":{"start_line":443,"start_character":0,"end_line":450,"end_character":19},"in_reply_to":"9f560f44_aa5d497a","updated":"2020-08-24 13:06:25.000000000","message":"thanks","commit_id":"2f0c352973ebd7d062f4d1818adb8e05093169f1"},{"author":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"change_message_id":"0e6faac948c64918ef249a532d4c23a52571a592","unresolved":false,"context_lines":[{"line_number":440,"context_line":"    def _create(self, request, body, **kwargs):"},{"line_number":441,"context_line":"        \"\"\"Creates a new instance of the requested entity.\"\"\""},{"line_number":442,"context_line":"        parent_id \u003d kwargs.get(self._parent_id_name)"},{"line_number":443,"context_line":"        try:"},{"line_number":444,"context_line":"            body \u003d Controller.prepare_request_body("},{"line_number":445,"context_line":"                request.context, body, True, self._resource, self._attr_info,"},{"line_number":446,"context_line":"                allow_bulk\u003dself._allow_bulk)"},{"line_number":447,"context_line":"        except Exception as e:"},{"line_number":448,"context_line":"            LOG.warning(\"An exception happened while processing the request \""},{"line_number":449,"context_line":"                        \"body. The exception message is [%s].\", e)"},{"line_number":450,"context_line":"            raise e"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"        action \u003d self._plugin_handlers[self.CREATE]"},{"line_number":453,"context_line":"        # Check authz"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_aa5d497a","line":450,"range":{"start_line":443,"start_character":0,"end_line":450,"end_character":19},"in_reply_to":"9f560f44_cad99d56","updated":"2020-08-24 12:44:02.000000000","message":"No, because each try/except block is in a different API method call. This block, for instance, it is only used in the \"create\"/\"post\" API method call.\n\nIdeally, we should try to reduce this code replication, but I did not find a method to do that, and I just wanted to avoid others to experience the same issue I had. Therefore, I proposed the enhancement without improvements to the code structure.","commit_id":"2f0c352973ebd7d062f4d1818adb8e05093169f1"}]}
