)]}'
{"neutron/plugins/ml2/driver_context.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"c5a776ed2dcced8fb376caca33f6eb7d09f5da62","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        for s in self.network.network_segments:"},{"line_number":196,"context_line":"            if s[\u0027id\u0027] \u003d\u003d segment_id:"},{"line_number":197,"context_line":"                return s"},{"line_number":198,"context_line":"        # TODO(kevinbenton): eliminate the query below. The above should"},{"line_number":199,"context_line":"        # always return since the port is bound to a network segment. Leaving"},{"line_number":200,"context_line":"        # in for now for minimally invasive change for back-port."},{"line_number":201,"context_line":"        segment \u003d segments_db.get_segment_by_id(self._plugin_context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa31d9ce_696c2837","line":198,"updated":"2017-02-16 19:41:47.000000000","message":"Take a look at that function you linked to. It catches the exception and then returns None.","commit_id":"49d6d553d2a63be80540cee3f718d846da6f1025"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"889b249cf38e5a54bef6fc2356be958c65b4163e","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        for s in self.network.network_segments:"},{"line_number":196,"context_line":"            if s[\u0027id\u0027] \u003d\u003d segment_id:"},{"line_number":197,"context_line":"                return s"},{"line_number":198,"context_line":"        # TODO(kevinbenton): eliminate the query below. The above should"},{"line_number":199,"context_line":"        # always return since the port is bound to a network segment. Leaving"},{"line_number":200,"context_line":"        # in for now for minimally invasive change for back-port."},{"line_number":201,"context_line":"        segment \u003d segments_db.get_segment_by_id(self._plugin_context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa31d9ce_d8732414","line":198,"range":{"start_line":198,"start_character":29,"end_line":198,"end_character":38},"updated":"2017-02-16 18:08:00.000000000","message":"The query below has to be replaced for NoResultFound exception[1] to keep the same logic\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/db/segments_db.py#L97","commit_id":"49d6d553d2a63be80540cee3f718d846da6f1025"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"7961a32326282d47288dd66d3029a0aec250a89a","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        for s in self.network.network_segments:"},{"line_number":196,"context_line":"            if s[\u0027id\u0027] \u003d\u003d segment_id:"},{"line_number":197,"context_line":"                return s"},{"line_number":198,"context_line":"        # TODO(kevinbenton): eliminate the query below. The above should"},{"line_number":199,"context_line":"        # always return since the port is bound to a network segment. Leaving"},{"line_number":200,"context_line":"        # in for now for minimally invasive change for back-port."},{"line_number":201,"context_line":"        segment \u003d segments_db.get_segment_by_id(self._plugin_context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa31d9ce_f302c971","line":198,"range":{"start_line":198,"start_character":29,"end_line":198,"end_character":38},"in_reply_to":"fa31d9ce_d8732414","updated":"2017-02-16 18:36:30.000000000","message":"I\u0027m not following. We still return None in this function if the segment doesn\u0027t exist. What do you mean?","commit_id":"49d6d553d2a63be80540cee3f718d846da6f1025"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"748e4cfaff6f64f4cff58dda58cc000fecc25dc7","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        for s in self.network.network_segments:"},{"line_number":196,"context_line":"            if s[\u0027id\u0027] \u003d\u003d segment_id:"},{"line_number":197,"context_line":"                return s"},{"line_number":198,"context_line":"        # TODO(kevinbenton): eliminate the query below. The above should"},{"line_number":199,"context_line":"        # always return since the port is bound to a network segment. Leaving"},{"line_number":200,"context_line":"        # in for now for minimally invasive change for back-port."},{"line_number":201,"context_line":"        segment \u003d segments_db.get_segment_by_id(self._plugin_context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa31d9ce_2998706a","line":198,"range":{"start_line":198,"start_character":29,"end_line":198,"end_character":38},"in_reply_to":"fa31d9ce_f302c971","updated":"2017-02-16 19:35:02.000000000","message":"What I mean is the get_segment_by_id function returns an exception when there is no record with that id.  In this implementation you\u0027re returning None when the id is not found.","commit_id":"49d6d553d2a63be80540cee3f718d846da6f1025"}]}
