)]}'
{"neutron/agent/windows/ip_lib.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c85d31f2d8097f7fd37cb6d7a4dc4121b7f74156","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            try:"},{"line_number":53,"context_line":"                device_addresses \u003d netifaces.ifaddresses(self.device_name)"},{"line_number":54,"context_line":"            except ValueError:  # The device does not exist on the system"},{"line_number":55,"context_line":"                return False"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            addresses \u003d [ip_addr[\u0027addr\u0027] for ip_addr in"}],"source_content_type":"text/x-python","patch_set":5,"id":"da6895a0_0266f9ec","line":54,"updated":"2016-10-22 16:29:20.000000000","message":"I think that this should be:\nexcept (ValueError, OSError):\nthen you do not need the try on line 51 (for example the method may raise OSError (https://bitbucket.org/al45tair/netifaces/src/bad47e7a1a79e6361f27ed41ff6c9855cf388388/netifaces.c?at\u003ddefault\u0026fileviewer\u003dfile-view-default#netifaces.c-762)\nNot sure where is raises ValueError","commit_id":"a574b6a5f62885dc860c63c876f6a86ae5624165"},{"author":{"_account_id":16934,"name":"Martin Roy","email":"lindycoder@gmail.com","username":"lindycoder"},"change_message_id":"bb54525b781b7c3bff03be86dab4d2c0f5907e15","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            try:"},{"line_number":53,"context_line":"                device_addresses \u003d netifaces.ifaddresses(self.device_name)"},{"line_number":54,"context_line":"            except ValueError:  # The device does not exist on the system"},{"line_number":55,"context_line":"                return False"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            addresses \u003d [ip_addr[\u0027addr\u0027] for ip_addr in"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a629dbe_5e10bca8","line":54,"in_reply_to":"da6895a0_0266f9ec","updated":"2016-11-08 15:31:03.000000000","message":"You are right both except can be only trying this line, i\u0027ll split them in 2 except though as they actually don\u0027t log the same thing (one don\u0027t even log)\n\nThe value error is raised at the very end of the function if the interface is not found.\nhttps://bitbucket.org/al45tair/netifaces/src/bad47e7a1a79e6361f27ed41ff6c9855cf388388/netifaces.c?at\u003ddefault\u0026fileviewer\u003dfile-view-default#netifaces.c-1261","commit_id":"a574b6a5f62885dc860c63c876f6a86ae5624165"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c85d31f2d8097f7fd37cb6d7a4dc4121b7f74156","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            except ValueError:  # The device does not exist on the system"},{"line_number":55,"context_line":"                return False"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            addresses \u003d [ip_addr[\u0027addr\u0027] for ip_addr in"},{"line_number":58,"context_line":"                         device_addresses.get(netifaces.AF_INET, [])]"},{"line_number":59,"context_line":"            return ip in addresses"},{"line_number":60,"context_line":"        except OSError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da6895a0_4260f1ce","line":57,"updated":"2016-10-22 16:29:20.000000000","message":"what can cause an exception here with this list comprehension?","commit_id":"a574b6a5f62885dc860c63c876f6a86ae5624165"},{"author":{"_account_id":16934,"name":"Martin Roy","email":"lindycoder@gmail.com","username":"lindycoder"},"change_message_id":"bb54525b781b7c3bff03be86dab4d2c0f5907e15","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            except ValueError:  # The device does not exist on the system"},{"line_number":55,"context_line":"                return False"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            addresses \u003d [ip_addr[\u0027addr\u0027] for ip_addr in"},{"line_number":58,"context_line":"                         device_addresses.get(netifaces.AF_INET, [])]"},{"line_number":59,"context_line":"            return ip in addresses"},{"line_number":60,"context_line":"        except OSError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a629dbe_3eb148e2","line":57,"in_reply_to":"da6895a0_4260f1ce","updated":"2016-11-08 15:31:03.000000000","message":"You are right there\u0027s none","commit_id":"a574b6a5f62885dc860c63c876f6a86ae5624165"}],"neutron/tests/unit/agent/windows/test_ip_lib.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"192aa3347cd7089f3f19894f2416be8f004bb499","unresolved":false,"context_lines":[{"line_number":39,"context_line":"\r"},{"line_number":40,"context_line":"    @mock.patch.object(ip_lib.IPWrapper, \u0027get_devices\u0027)\r"},{"line_number":41,"context_line":"    def test_get_device_by_ip_exception(self, mock_get_devices):\r"},{"line_number":42,"context_line":"        mock_get_devices.side_effect \u003d OSError\r"},{"line_number":43,"context_line":"        ret \u003d ip_lib.IPWrapper().get_device_by_ip(mock.sentinel.fake_ip)\r"},{"line_number":44,"context_line":"\r"},{"line_number":45,"context_line":"        self.assertIsNone(ret)\r"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_c0f38671","line":42,"updated":"2016-04-07 21:58:57.000000000","message":"how about moving it into line 40 and passing as an argument? that issue would not happen if that would be done in the first place.","commit_id":"5dff573febfc9bad2748acbe169c4ae7affdbfc1"},{"author":{"_account_id":16934,"name":"Martin Roy","email":"lindycoder@gmail.com","username":"lindycoder"},"change_message_id":"a671872b3ec157897f8a617dfa1409bade67c377","unresolved":false,"context_lines":[{"line_number":39,"context_line":"\r"},{"line_number":40,"context_line":"    @mock.patch.object(ip_lib.IPWrapper, \u0027get_devices\u0027)\r"},{"line_number":41,"context_line":"    def test_get_device_by_ip_exception(self, mock_get_devices):\r"},{"line_number":42,"context_line":"        mock_get_devices.side_effect \u003d OSError\r"},{"line_number":43,"context_line":"        ret \u003d ip_lib.IPWrapper().get_device_by_ip(mock.sentinel.fake_ip)\r"},{"line_number":44,"context_line":"\r"},{"line_number":45,"context_line":"        self.assertIsNone(ret)\r"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_83b87812","line":42,"in_reply_to":"9a061dce_c0f38671","updated":"2016-04-07 22:10:27.000000000","message":"do you talk about this form?\n\n@mock.patch.object(ip_lib.IPWrapper, \u0027get_devices\u0027, side_effect\u003dOSError)\n    def test_get_device_by_ip_exception(self, _):\n...\n\ncaus if so that would not have prevented the error.\n\nAnd i just realized that this test is completely wrong as get_devices cannot raise an OSError at all as it is excepted along with MemoryError","commit_id":"5dff573febfc9bad2748acbe169c4ae7affdbfc1"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"4052b5190e8bd1de86469ef6e43b8165ae51aece","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        self.assertEqual(mock_dev2, ret)\r"},{"line_number":39,"context_line":"\r"},{"line_number":40,"context_line":"    @mock.patch.object(ip_lib.IPWrapper, \u0027get_devices\u0027)\r"},{"line_number":41,"context_line":"    def test_get_device_by_ip_exception(self, mock_get_devices):\r"},{"line_number":42,"context_line":"        mock_get_devices.side_effects \u003d OSError\r"},{"line_number":43,"context_line":"        ret \u003d ip_lib.IPWrapper().get_device_by_ip(mock.sentinel.fake_ip)\r"},{"line_number":44,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_62ff0002","side":"PARENT","line":41,"range":{"start_line":41,"start_character":4,"end_line":41,"end_character":64},"updated":"2016-05-06 15:50:39.000000000","message":"I think this one should be moved to another patch.","commit_id":"3e26a7851e10d0bae5625c042e8f5f0f74ed327e"},{"author":{"_account_id":16934,"name":"Martin Roy","email":"lindycoder@gmail.com","username":"lindycoder"},"change_message_id":"8ed427ce18822cf8c95c856f69937884c731adf2","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        self.assertEqual(mock_dev2, ret)\r"},{"line_number":39,"context_line":"\r"},{"line_number":40,"context_line":"    @mock.patch.object(ip_lib.IPWrapper, \u0027get_devices\u0027)\r"},{"line_number":41,"context_line":"    def test_get_device_by_ip_exception(self, mock_get_devices):\r"},{"line_number":42,"context_line":"        mock_get_devices.side_effects \u003d OSError\r"},{"line_number":43,"context_line":"        ret \u003d ip_lib.IPWrapper().get_device_by_ip(mock.sentinel.fake_ip)\r"},{"line_number":44,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_f63455df","side":"PARENT","line":41,"range":{"start_line":41,"start_character":4,"end_line":41,"end_character":64},"in_reply_to":"dab17558_62ff0002","updated":"2016-05-06 16:11:18.000000000","message":"if i move this to another patch, i would need to correct the side_effects to side_effect and that would break since this test is just wrong.  So correcting it would break the build, and that\u0027s why i included it here","commit_id":"3e26a7851e10d0bae5625c042e8f5f0f74ed327e"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"98d7c00375d5a90e14cceec2c746f5a756690c98","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        self.assertEqual(mock_dev2, ret)\r"},{"line_number":39,"context_line":"\r"},{"line_number":40,"context_line":"    @mock.patch.object(ip_lib.IPWrapper, \u0027get_devices\u0027)\r"},{"line_number":41,"context_line":"    def test_get_device_by_ip_exception(self, mock_get_devices):\r"},{"line_number":42,"context_line":"        mock_get_devices.side_effects \u003d OSError\r"},{"line_number":43,"context_line":"        ret \u003d ip_lib.IPWrapper().get_device_by_ip(mock.sentinel.fake_ip)\r"},{"line_number":44,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_04943689","side":"PARENT","line":41,"range":{"start_line":41,"start_character":4,"end_line":41,"end_character":64},"in_reply_to":"dab17558_f63455df","updated":"2016-05-06 21:00:22.000000000","message":"I was thinking just about removing this line without changing \"side_effects\" -\u003e \"side_effect\".\nRight now you have two different changes in one place:\n1. remove test that doesn\u0027t work\n2. fix other tests.\n\nIf you just remove non working test, nothing will change for `test_get_devices` and `test_get_devices_error`.\nFollow-up patch then can fix both these tests.","commit_id":"3e26a7851e10d0bae5625c042e8f5f0f74ed327e"}]}
