)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c3359d1bbc0f23197b7e7c4e13731b5acdeca477","unresolved":false,"context_lines":[{"line_number":11,"context_line":"raise a exception."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Iee03e8fd808ea8237604454f4af5459d9fa156ee"},{"line_number":14,"context_line":"Signed-off-by: Sahid Orentino Ferdjaoui \u003csahid.ferdjaoui@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ff82abbf_cd133cb8","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":68},"updated":"2017-11-20 22:27:09.000000000","message":"Not needed","commit_id":"7b29a7268c458b028306bf89e8c6fc4cbaf8cda9"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"615defac66e785e9890cf189902242a7362c5e64","unresolved":false,"context_lines":[{"line_number":1818,"context_line":"                port_ids_to_devices["},{"line_number":1819,"context_line":"                    self._device_to_port_id(context, device)] \u003d device"},{"line_number":1820,"context_line":"            except exc.PortNotFound:"},{"line_number":1821,"context_line":"                pass"},{"line_number":1822,"context_line":"        port_ids \u003d list(port_ids_to_devices.keys())"},{"line_number":1823,"context_line":"        ports \u003d db.get_ports_and_sgs(context, port_ids)"},{"line_number":1824,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_3bf0c4c9","line":1821,"updated":"2017-09-23 17:00:58.000000000","message":"I should log something here...","commit_id":"5dc1b22b99c93a4dceaecfcaa1de16940cb939a7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"355b8de5dab91ceb2c1831ae67003c23ff15aa00","unresolved":false,"context_lines":[{"line_number":1835,"context_line":"        \"\"\"Returns port ID based on device string"},{"line_number":1836,"context_line":""},{"line_number":1837,"context_line":"        A device string can be a truncated UUID prefixed by interface"},{"line_number":1838,"context_line":"        like es tapAAABBBCCC, a full UUID representing the port ID or"},{"line_number":1839,"context_line":"        a MAC address."},{"line_number":1840,"context_line":""},{"line_number":1841,"context_line":"        In all cases that method is going to return the full UUID of"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_13e281d6","line":1838,"range":{"start_line":1838,"start_character":8,"end_line":1838,"end_character":15},"updated":"2017-09-25 09:57:10.000000000","message":"nit: I don\u0027t understand this","commit_id":"ba7f29ab4e8b609ef5a10f8ac83afedc6808ddf0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c78e50ad60d9bff3509057ccb1dd1120fb4397e5","unresolved":false,"context_lines":[{"line_number":1842,"context_line":"        \"\"\"Returns port ID based on device string"},{"line_number":1843,"context_line":""},{"line_number":1844,"context_line":"        A device string can be a truncated UUID prefixed by interface"},{"line_number":1845,"context_line":"        like es tapAAABBBCCC, a full UUID representing the port ID or"},{"line_number":1846,"context_line":"        a MAC address."},{"line_number":1847,"context_line":""},{"line_number":1848,"context_line":"        In all cases that method is going to return the full UUID of"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_23553efa","line":1845,"updated":"2017-11-29 22:13:37.000000000","message":"\"es\"? maybe \"is\" or \"e.g.\"?","commit_id":"7b29a7268c458b028306bf89e8c6fc4cbaf8cda9"}],"neutron/plugins/ml2/rpc.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"75bedfd95460d9800aeee5d97249cd5a84dc38db","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                      device)"},{"line_number":95,"context_line":"        else:"},{"line_number":96,"context_line":"            port \u003d port_context.current"},{"line_number":97,"context_line":"        finally:"},{"line_number":98,"context_line":"            if not port_id or not port_context:"},{"line_number":99,"context_line":"                LOG.debug(\"Device %(device)s requested by agent \""},{"line_number":100,"context_line":"                          \"%(agent_id)s not found in database\","},{"line_number":101,"context_line":"                          {\u0027device\u0027: device, \u0027agent_id\u0027: agent_id})"},{"line_number":102,"context_line":"                return {\u0027device\u0027: device}"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        # caching information about networks for future use"},{"line_number":105,"context_line":"        if cached_networks is not None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_bbecca29","line":102,"range":{"start_line":97,"start_character":8,"end_line":102,"end_character":41},"updated":"2017-10-04 08:45:35.000000000","message":"pep8 throws an error for using \"return\" in finally block: return statement in finally block may swallow exception\n\nI think you should remove the finally block and execute the condition (if not port_id or not port_context:) out of it","commit_id":"f57d26394c75480399e88be8f1f6c0919e19583e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c3359d1bbc0f23197b7e7c4e13731b5acdeca477","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            LOG.debug(\"Not able to retrieve port_id from device: %s\","},{"line_number":94,"context_line":"                      device)"},{"line_number":95,"context_line":"        else:"},{"line_number":96,"context_line":"            port \u003d port_context.current"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        if not port_id or not port_context:"},{"line_number":99,"context_line":"            LOG.debug(\"Device %(device)s requested by agent \""}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_edcba01b","line":96,"range":{"start_line":96,"start_character":19,"end_line":96,"end_character":31},"updated":"2017-11-20 22:27:09.000000000","message":"You still need to check if you have a non None value here","commit_id":"7b29a7268c458b028306bf89e8c6fc4cbaf8cda9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c78e50ad60d9bff3509057ccb1dd1120fb4397e5","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            LOG.debug(\"Not able to retrieve port_id from device: %s\","},{"line_number":94,"context_line":"                      device)"},{"line_number":95,"context_line":"        else:"},{"line_number":96,"context_line":"            port \u003d port_context.current"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        if not port_id or not port_context:"},{"line_number":99,"context_line":"            LOG.debug(\"Device %(device)s requested by agent \""}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_4358822f","line":96,"updated":"2017-11-29 22:13:37.000000000","message":"can\u0027t You just move this line to \"try\" part (L91)?\nCheck which Miguel suggest could be important IMHO only if plugin.get_bound_port_context() could return None in some cases but it looks for me that it can\u0027t so such check is not needed IMHO","commit_id":"7b29a7268c458b028306bf89e8c6fc4cbaf8cda9"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"6e6bfc5ca1845b685891af23ab12e21b80584498","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            LOG.debug(\"Not able to retrieve port_id from device: %s\","},{"line_number":94,"context_line":"                      device)"},{"line_number":95,"context_line":"        else:"},{"line_number":96,"context_line":"            port \u003d port_context.current"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        if not port_id or not port_context:"},{"line_number":99,"context_line":"            LOG.debug(\"Device %(device)s requested by agent \""}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_ac544fff","line":96,"range":{"start_line":96,"start_character":19,"end_line":96,"end_character":31},"in_reply_to":"ff82abbf_edcba01b","updated":"2017-11-28 12:09:41.000000000","message":"If you look line 96 you will see the same pattern, I would like avoid logical change.","commit_id":"7b29a7268c458b028306bf89e8c6fc4cbaf8cda9"}],"neutron/tests/unit/plugins/ml2/test_plugin.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c78e50ad60d9bff3509057ccb1dd1120fb4397e5","unresolved":false,"context_lines":[{"line_number":1363,"context_line":"        with mock.patch.object(ml2_db, \u0027get_port\u0027) as ml2_db_get_port:"},{"line_number":1364,"context_line":"            for prefix in n_const.INTERFACE_PREFIXES:"},{"line_number":1365,"context_line":"                expected \u003d uuidutils.generate_uuid()"},{"line_number":1366,"context_line":"                device \u003d \"%s%s\" % (prefix, expected[:8])"},{"line_number":1367,"context_line":"                ml2_db_get_port.return_value \u003d mock.MagicMock(id\u003dexpected)"},{"line_number":1368,"context_line":"                self.assertEqual(expected,"},{"line_number":1369,"context_line":"                                 ml2_plugin.Ml2Plugin._device_to_port_id("}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_e342f63d","line":1366,"updated":"2017-11-29 22:13:37.000000000","message":"\"8\" is some kind of magic value here for me, can\u0027t You use some constant maybe?","commit_id":"7b29a7268c458b028306bf89e8c6fc4cbaf8cda9"}]}
