)]}'
{"glance/api/v2/images.py":[{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"dcf57daa802550d6a92759d45d8a18671708bba1","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                    self._do_remove_locations(image, replace_element)"},{"line_number":204,"context_line":"                except exception.Forbidden as e:"},{"line_number":205,"context_line":"                    raise webob.exc.HTTPForbidden(e.msg)"},{"line_number":206,"context_line":"                self._do_add_locations(image, replace_element, value)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        else:"},{"line_number":209,"context_line":"            if hasattr(image, path_root):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_6b0f7888","line":206,"range":{"start_line":206,"start_character":16,"end_line":206,"end_character":69},"updated":"2016-11-30 23:06:11.000000000","message":"I\u0027m not sure, is it at all possible to have a policy where removing a location is allowed but adding is not?\n\nIf so, this may result in a bad state where this patch replace call only partially succeeds.","commit_id":"51157cf137e19c337d031cf1ff3dd18b13fd80f4"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"ce4129cc3833dd013a466898233be929ca9489ec","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                try:"},{"line_number":194,"context_line":"                    self._do_add_locations(image, replace_element, value)"},{"line_number":195,"context_line":"                except exception.Forbidden as err:"},{"line_number":196,"context_line":"                    raise err"},{"line_number":197,"context_line":"                try:"},{"line_number":198,"context_line":"                    self._do_remove_locations(image,"},{"line_number":199,"context_line":"                                              str(int(replace_element) + 1))"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_8b34164c","line":196,"updated":"2017-10-10 18:00:04.000000000","message":"s/raise err/raise/\n\nThough all you are doing here is catching and rethrowing, so just remove the try/except.","commit_id":"ebc5cc4f4ba6642ae953c12a5dfc0459337f1917"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"ce4129cc3833dd013a466898233be929ca9489ec","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                    try:"},{"line_number":202,"context_line":"                        # Remove the added location"},{"line_number":203,"context_line":"                        self._do_remove_locations(image, replace_element)"},{"line_number":204,"context_line":"                        LOG.warn(_LW(\"The replace operation did not complete \""},{"line_number":205,"context_line":"                                     \"successfully\"))"},{"line_number":206,"context_line":"                    except Exception as err:"},{"line_number":207,"context_line":"                        # Location added instead of replace due to remove"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_ebef0aae","line":204,"range":{"start_line":204,"start_character":28,"end_line":204,"end_character":32},"updated":"2017-10-10 18:00:04.000000000","message":"warn is deprecated in the python logging library. oslo_log handles it internally, but would be better to just use LOG.warning.","commit_id":"ebc5cc4f4ba6642ae953c12a5dfc0459337f1917"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"ce4129cc3833dd013a466898233be929ca9489ec","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                        LOG.error(_LE(\"The replace operation did not complete \""},{"line_number":210,"context_line":"                                      \"successfully. The location was added \""},{"line_number":211,"context_line":"                                      \"however.\"))"},{"line_number":212,"context_line":"                        raise err"},{"line_number":213,"context_line":"        elif path_root \u003d\u003d \u0027locations\u0027 and value \u003d\u003d []:"},{"line_number":214,"context_line":"            msg \u003d _(\"Cannot set locations to empty list.\")"},{"line_number":215,"context_line":"            raise webob.exc.HTTPForbidden(msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_4bf97e7e","line":212,"range":{"start_line":212,"start_character":30,"end_line":212,"end_character":33},"updated":"2017-10-10 18:00:04.000000000","message":"Should just be raise, not raise err.","commit_id":"ebc5cc4f4ba6642ae953c12a5dfc0459337f1917"}]}
