)]}'
{"cinder/api/contrib/admin_actions.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"84e08e0686b99416c9400a74962a0d8879cd0754","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        self.authorize(context, \u0027force_detach\u0027)"},{"line_number":206,"context_line":"        # Not found exception will be handled at the wsgi level"},{"line_number":207,"context_line":"        volume \u003d self._get(context, id)"},{"line_number":208,"context_line":"        connector \u003d body[\u0027os-force_detach\u0027].get(\u0027connector\u0027, None)"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            self.volume_api.terminate_connection(context, volume, connector)"},{"line_number":211,"context_line":"        except exception.VolumeBackendAPIException as error:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff0f0b1f_f4955534","line":208,"range":{"start_line":208,"start_character":8,"end_line":208,"end_character":66},"updated":"2017-05-22 15:33:42.000000000","message":"I don\u0027t think this is the right approach.  Here, if the connector is not sent in we will end up with a KeyError anyway.  The exception will get passed up and we will fail elsewhere.  I think the change needs to catch the KeyError and pass since it is no longer a failure.  The unit test will also need to be updated.","commit_id":"582c24c91a5da2a8eef3167fac87ac2944f0f376"},{"author":{"_account_id":24564,"name":"qtlu","email":"qtlu@fiberhome.com","username":"qtlu"},"change_message_id":"ccba15c7d7111ce19e0f932f31a83615d97c8fcc","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        self.authorize(context, \u0027force_detach\u0027)"},{"line_number":206,"context_line":"        # Not found exception will be handled at the wsgi level"},{"line_number":207,"context_line":"        volume \u003d self._get(context, id)"},{"line_number":208,"context_line":"        connector \u003d body[\u0027os-force_detach\u0027].get(\u0027connector\u0027, None)"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            self.volume_api.terminate_connection(context, volume, connector)"},{"line_number":211,"context_line":"        except exception.VolumeBackendAPIException as error:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff0f0b1f_e24f4832","line":208,"range":{"start_line":208,"start_character":8,"end_line":208,"end_character":66},"in_reply_to":"ff0f0b1f_9c6357b2","updated":"2017-05-26 05:41:18.000000000","message":"Thanks for you review, i\u0027ve added a check to this case.","commit_id":"582c24c91a5da2a8eef3167fac87ac2944f0f376"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"c62b76b5675576d68837fa86b47fdbde7b6647bb","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        self.authorize(context, \u0027force_detach\u0027)"},{"line_number":206,"context_line":"        # Not found exception will be handled at the wsgi level"},{"line_number":207,"context_line":"        volume \u003d self._get(context, id)"},{"line_number":208,"context_line":"        connector \u003d body[\u0027os-force_detach\u0027].get(\u0027connector\u0027, None)"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            self.volume_api.terminate_connection(context, volume, connector)"},{"line_number":211,"context_line":"        except exception.VolumeBackendAPIException as error:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff0f0b1f_9c6357b2","line":208,"range":{"start_line":208,"start_character":8,"end_line":208,"end_character":66},"in_reply_to":"ff0f0b1f_f4955534","updated":"2017-05-26 03:21:04.000000000","message":"Actually the original codes at the left side is imperfect. The only case that the except statement will be triggerd is when \u0027os-force_detach\u0027 is missed in the body not the \u0027connector\u0027. But it\u0027s still better to wrap this statement with try/except because we could have the case below:\n```\n{\u0027os-force_detach\u0027: null }   //lol TypeError here.\n```","commit_id":"582c24c91a5da2a8eef3167fac87ac2944f0f376"},{"author":{"_account_id":24564,"name":"qtlu","email":"qtlu@fiberhome.com","username":"qtlu"},"change_message_id":"02f14d9f80506ba3aac57454441a8c97fec07c15","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        self.authorize(context, \u0027force_detach\u0027)"},{"line_number":206,"context_line":"        # Not found exception will be handled at the wsgi level"},{"line_number":207,"context_line":"        volume \u003d self._get(context, id)"},{"line_number":208,"context_line":"        connector \u003d body[\u0027os-force_detach\u0027].get(\u0027connector\u0027, None)"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            self.volume_api.terminate_connection(context, volume, connector)"},{"line_number":211,"context_line":"        except exception.VolumeBackendAPIException as error:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff0f0b1f_e240e5a7","line":208,"range":{"start_line":208,"start_character":8,"end_line":208,"end_character":66},"in_reply_to":"ff0f0b1f_f4955534","updated":"2017-05-23 00:55:01.000000000","message":"The dict.get(\u0027connector\u0027, None) method never raises a KeyError, unless we change it to: body[\u0027os-force_detach\u0027][\u0027connector\u0027], is it right?","commit_id":"582c24c91a5da2a8eef3167fac87ac2944f0f376"}]}
