)]}'
{"neutron/privileged/agent/linux/ip_lib.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"573459683295c89207734050c3e5095c40698d7a","unresolved":false,"context_lines":[{"line_number":243,"context_line":"def get_link_id(device, namespace):"},{"line_number":244,"context_line":"    with get_iproute(namespace) as ip:"},{"line_number":245,"context_line":"        link_id \u003d ip.link_lookup(ifname\u003ddevice)"},{"line_number":246,"context_line":"        if not link_id or len(link_id) \u003c 1:"},{"line_number":247,"context_line":"            raise NetworkInterfaceNotFound(device\u003ddevice, namespace\u003dnamespace)"},{"line_number":248,"context_line":"        return link_id[0]"},{"line_number":249,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_b0db5c7b","line":246,"updated":"2019-10-24 03:17:48.000000000","message":"This doesn\u0027t need to be under the \u0027with\u0027, so can be un-indented 4 spaces.\n\nAlso, maybe \u0027not len(link_id)\u0027 since it can\u0027t be \u003c1 anyways","commit_id":"fb79ef91e07df4e3b942ac46612377542d6533df"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"de5cedd8b70ff7490d3910e6e49fd0725278032d","unresolved":false,"context_lines":[{"line_number":243,"context_line":"def get_link_id(device, namespace):"},{"line_number":244,"context_line":"    with get_iproute(namespace) as ip:"},{"line_number":245,"context_line":"        link_id \u003d ip.link_lookup(ifname\u003ddevice)"},{"line_number":246,"context_line":"        if not link_id or len(link_id) \u003c 1:"},{"line_number":247,"context_line":"            raise NetworkInterfaceNotFound(device\u003ddevice, namespace\u003dnamespace)"},{"line_number":248,"context_line":"        return link_id[0]"},{"line_number":249,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_5997b3ec","line":246,"in_reply_to":"3fa7e38b_b0db5c7b","updated":"2019-10-24 09:20:11.000000000","message":"Yes, I\u0027ll move the indentation.\n\nAbout this check, ip.link_lookup() should always return a list, but I don\u0027t trust pyroute2 output. That\u0027s why I\u0027m checking first \"if not link_id\" just in case link_id is None, and then I check the length of the returned list (if any).","commit_id":"fb79ef91e07df4e3b942ac46612377542d6533df"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d8a0e374bad7df94ae353bc83cc973b8d77f206a","unresolved":false,"context_lines":[{"line_number":243,"context_line":"def get_link_id(device, namespace):"},{"line_number":244,"context_line":"    with get_iproute(namespace) as ip:"},{"line_number":245,"context_line":"        link_id \u003d ip.link_lookup(ifname\u003ddevice)"},{"line_number":246,"context_line":"    if not link_id or len(link_id) \u003c 1:"},{"line_number":247,"context_line":"        raise NetworkInterfaceNotFound(device\u003ddevice, namespace\u003dnamespace)"},{"line_number":248,"context_line":"    return link_id[0]"},{"line_number":249,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_4d1a8a17","line":246,"updated":"2019-10-24 13:26:00.000000000","message":"Yes, I meant \u0027not link_id or not len(link_id)\u0027 which checks for non-zero, it\u0027s basically the same check as \u003c 1.  It\u0027s my C brain talking since \"not something\" can be optimized by compilers, where \"less than something\" not so much.  You don\u0027t have to change it I just notice these things :)\n\nAnd since you added this \u0027not link_id\u0027 check you should add a test for it, copy/paste of test_run_iproute_link_interface_not_exists() with a return_value of None would work.","commit_id":"eb9481c12cf4de4313fc4948ebb46eb0e986db74"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"c15b8c7ea000b12d546ad9a87791667e6ec34a83","unresolved":false,"context_lines":[{"line_number":243,"context_line":"def get_link_id(device, namespace):"},{"line_number":244,"context_line":"    with get_iproute(namespace) as ip:"},{"line_number":245,"context_line":"        link_id \u003d ip.link_lookup(ifname\u003ddevice)"},{"line_number":246,"context_line":"    if not link_id or len(link_id) \u003c 1:"},{"line_number":247,"context_line":"        raise NetworkInterfaceNotFound(device\u003ddevice, namespace\u003dnamespace)"},{"line_number":248,"context_line":"    return link_id[0]"},{"line_number":249,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_c1d64154","line":246,"in_reply_to":"3fa7e38b_4d1a8a17","updated":"2019-10-24 15:35:12.000000000","message":"On my way.","commit_id":"eb9481c12cf4de4313fc4948ebb46eb0e986db74"}],"neutron/tests/unit/privileged/agent/linux/test_ip_lib.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"73eab2c8953bdecff56ee511b3a1e0ba2ad45c7b","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        mock_ip \u003d mock.Mock()"},{"line_number":227,"context_line":"        mock_iproute.return_value.__enter__.return_value \u003d mock_ip"},{"line_number":228,"context_line":"        ret_values \u003d ["},{"line_number":229,"context_line":"            [],    # No interface found."},{"line_number":230,"context_line":"            None,  # Unexpected output but also handled."},{"line_number":231,"context_line":"        ]"},{"line_number":232,"context_line":"        for ret_val in ret_values:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_7ad92181","line":229,"updated":"2019-10-25 15:04:03.000000000","message":"This duplicates test at L47 now, right?  So it can be removed?  And maybe you can move these tests there to be near friends?","commit_id":"9878341f2860d3f53425bd956ab85fe965c9edc1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"80e65bb022c82a45c3be83d40d7d1afc6bd38270","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        mock_ip \u003d mock.Mock()"},{"line_number":227,"context_line":"        mock_iproute.return_value.__enter__.return_value \u003d mock_ip"},{"line_number":228,"context_line":"        ret_values \u003d ["},{"line_number":229,"context_line":"            [],    # No interface found."},{"line_number":230,"context_line":"            None,  # Unexpected output but also handled."},{"line_number":231,"context_line":"        ]"},{"line_number":232,"context_line":"        for ret_val in ret_values:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_3aa4094b","line":229,"in_reply_to":"3fa7e38b_7ad92181","updated":"2019-10-25 15:33:56.000000000","message":"Done","commit_id":"9878341f2860d3f53425bd956ab85fe965c9edc1"}]}
