)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"8bf591875e1d7128d456ac9fe8082fdc6d87dd65","unresolved":false,"context_lines":[{"line_number":7,"context_line":"make trust manager raise formatted message exception"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Keystone Exception doesn\u0027t support the following use:"},{"line_number":10,"context_line":"raise exception.Forbidden(_(\u0027%(xx)d %(yy)d]\u0027), xx\u003d1, yy\u003d2)"},{"line_number":11,"context_line":"This can lead to a bug that we will get a unformatted message when"},{"line_number":12,"context_line":"error happens."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a6ced46_2ee1af9a","line":10,"updated":"2015-03-24 04:46:09.000000000","message":"Exceptions do not support the comma notation that logging supports, in this case the correct use is:\n\n  exception.Forbidden(_(\u0027%(xx)d %(yy)d]\u0027) % {\u0027xx\u0027: 1, \u0027yy\u0027: 2})","commit_id":"53df52547d50b380a5c09f692c73c39986a8eae9"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"30ca9baebd5804abcdf33540a315f473c3c64f50","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Keystone Exception doesn\u0027t support the following use:"},{"line_number":10,"context_line":"raise exception.Forbidden(_(\u0027%(xx)d %(yy)d]\u0027), xx\u003d1, yy\u003d2)"},{"line_number":11,"context_line":"This can lead to a bug that we will get a unformatted message when"},{"line_number":12,"context_line":"error happens."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I8a9d4b61eaed8575fe1473ccf5d54a4efe752f21"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a6ced46_de80bc48","line":11,"updated":"2015-03-24 11:56:05.000000000","message":"*an unformatted","commit_id":"53df52547d50b380a5c09f692c73c39986a8eae9"}],"keystone/exception.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"21e8cba93886df94320eaaed894092fedd9986bb","unresolved":false,"context_lines":[{"line_number":434,"context_line":""},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"class MaxRedelegationDepthReached(Forbidden):"},{"line_number":437,"context_line":"    message_format \u003d _(\u0027Redelegation depth of %(redelegation_depth)d is \u0027"},{"line_number":438,"context_line":"                       \u0027out of allowed range of [0..%(max_count)d]\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa81d914_60e9e87f","line":437,"updated":"2015-01-29 03:16:18.000000000","message":"nit: \n\n    _(\u0027Unable to redelegate trust because the configured redelegation depth of %(max_count)d has been exceeded.\u0027)","commit_id":"95c540a735baa7f178bf335aec044a366bc5af0f"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"30ca9baebd5804abcdf33540a315f473c3c64f50","unresolved":false,"context_lines":[{"line_number":461,"context_line":""},{"line_number":462,"context_line":"class MaxRedelegationDepthReached(Forbidden):"},{"line_number":463,"context_line":"    message_format \u003d _(\u0027Unable to redelegate trust because the configured \u0027"},{"line_number":464,"context_line":"                       \u0027redelegation depth of %(max_count)d has been\u0027"},{"line_number":465,"context_line":"                       \u0027 exceeded.\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6ced46_bea6a00e","line":464,"updated":"2015-03-24 11:56:05.000000000","message":"We shouldn\u0027t mix space position by putting them at the end and at the beginning of new line. Need to stick to one pattern (most of the code here puts it at the end).","commit_id":"53df52547d50b380a5c09f692c73c39986a8eae9"}],"keystone/tests/test_backend.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"21e8cba93886df94320eaaed894092fedd9986bb","unresolved":false,"context_lines":[{"line_number":4355,"context_line":"                \u0027redelegation_count\u0027: CONF.trust.max_redelegation_count + 1}"},{"line_number":4356,"context_line":"            self.trust_api.create_trust("},{"line_number":4357,"context_line":"                uuid.uuid4().hex,"},{"line_number":4358,"context_line":"                wrong_strust,"},{"line_number":4359,"context_line":"                [])"},{"line_number":4360,"context_line":"        except exception.MaxRedelegationDepthReached as e:"},{"line_number":4361,"context_line":"            self.assertIn(str(CONF.trust.max_redelegation_count + 1),"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa81d914_8087bcd6","line":4358,"updated":"2015-01-29 03:16:18.000000000","message":"strust?","commit_id":"95c540a735baa7f178bf335aec044a366bc5af0f"}],"keystone/trust/core.py":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"036611e69fa77e572708537e069aa63ef66ee8b6","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        max_redelegation_count \u003d CONF.trust.max_redelegation_count"},{"line_number":54,"context_line":"        redelegation_depth \u003d redelegated_trust.get(\u0027redelegation_count\u0027, 0)"},{"line_number":55,"context_line":"        if not (0 \u003c redelegation_depth \u003c\u003d max_redelegation_count):"},{"line_number":56,"context_line":"            raise exception.MaxRedelegationDepthReached("},{"line_number":57,"context_line":"                redelegation_depth\u003dredelegation_depth,"},{"line_number":58,"context_line":"                max_count\u003dmax_redelegation_count)"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a930d6b_028345cc","line":56,"updated":"2015-01-27 13:30:34.000000000","message":"wanghong, I believe your fixing is effective and have verified the bugs in my side, but I look forward to a better solution beside this.","commit_id":"95c540a735baa7f178bf335aec044a366bc5af0f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"21e8cba93886df94320eaaed894092fedd9986bb","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        # remaining_uses is None"},{"line_number":61,"context_line":"        remaining_uses \u003d trust.get(\u0027remaining_uses\u0027)"},{"line_number":62,"context_line":"        if remaining_uses is not None:"},{"line_number":63,"context_line":"            raise exception.Forbidden(_(\u0027remaining_uses must not be set in \u0027"},{"line_number":64,"context_line":"                                        \u0027order to redelegate a trust\u0027))"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # expiry times"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa81d914_2061b039","line":63,"updated":"2015-01-29 03:16:18.000000000","message":"Remaining*","commit_id":"95c540a735baa7f178bf335aec044a366bc5af0f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"21e8cba93886df94320eaaed894092fedd9986bb","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        remaining_uses \u003d trust.get(\u0027remaining_uses\u0027)"},{"line_number":62,"context_line":"        if remaining_uses is not None:"},{"line_number":63,"context_line":"            raise exception.Forbidden(_(\u0027remaining_uses must not be set in \u0027"},{"line_number":64,"context_line":"                                        \u0027order to redelegate a trust\u0027))"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # expiry times"},{"line_number":67,"context_line":"        trust_expiry \u003d trust.get(\u0027expires_at\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa81d914_e02078f9","line":64,"updated":"2015-01-29 03:16:18.000000000","message":"We should log the trust here too.","commit_id":"95c540a735baa7f178bf335aec044a366bc5af0f"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"faa6ec113cca1b48610e0a6ce233f3918c2e0433","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        remaining_uses \u003d trust.get(\u0027remaining_uses\u0027)"},{"line_number":62,"context_line":"        if remaining_uses is not None:"},{"line_number":63,"context_line":"            raise exception.Forbidden(_(\u0027remaining_uses must not be set in \u0027"},{"line_number":64,"context_line":"                                        \u0027order to redelegate a trust\u0027))"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # expiry times"},{"line_number":67,"context_line":"        trust_expiry \u003d trust.get(\u0027expires_at\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa81d914_492a4f7f","line":64,"in_reply_to":"fa81d914_e02078f9","updated":"2015-01-29 04:42:31.000000000","message":"++\n\nThis is why I suggest to fix it in another way, current logic is not flexible and I didn\u0027t see why we cannot modify this.  If we want to log some value we must design new exception to accommodate it with current workflow.","commit_id":"95c540a735baa7f178bf335aec044a366bc5af0f"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"8bf591875e1d7128d456ac9fe8082fdc6d87dd65","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            if requested_count and requested_count \u003e max_redelegation_count:"},{"line_number":140,"context_line":"                raise exception.Forbidden("},{"line_number":141,"context_line":"                    _(\u0027Requested redelegation depth of %(requested_count)d \u0027"},{"line_number":142,"context_line":"                      \u0027is greater than allowed %(max_count)d\u0027),"},{"line_number":143,"context_line":"                    requested_count\u003drequested_count,"},{"line_number":144,"context_line":"                    max_count\u003dmax_redelegation_count)"},{"line_number":145,"context_line":"            # Decline remaining_uses"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6ced46_6ecba71e","side":"PARENT","line":142,"updated":"2015-03-24 04:46:09.000000000","message":"This string is also not the same when moved to keystone.exception. This string cannot be changed until Liberty.","commit_id":"c0d56ecdf4964549299fb26ed4e52ada3bd783be"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4e4026d73f1da77465f2094c79b4125492d243ce","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        # remaining_uses is None"},{"line_number":60,"context_line":"        remaining_uses \u003d trust.get(\u0027remaining_uses\u0027)"},{"line_number":61,"context_line":"        if remaining_uses is not None:"},{"line_number":62,"context_line":"            msg \u003d _(\u0027Remaining_uses is set to %s while it must not be \u0027"},{"line_number":63,"context_line":"                    \u0027set in order to redelegate a trust\u0027)"},{"line_number":64,"context_line":"            raise exception.Forbidden(msg % remaining_uses)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_55fc793e","line":62,"updated":"2015-03-12 17:45:13.000000000","message":"For this, I think it would be easier for the user to understand if we left the number of remaining_uses out of the error.\n\n    msg \u003d _(\"Unable to redelegate trust %(trust_id)s since it has remaining \"\n            \"uses. In order to redelegate a trust, it shouldn\u0027t have \u0027remaining_uses\u0027 set.\")","commit_id":"53df52547d50b380a5c09f692c73c39986a8eae9"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"8bf591875e1d7128d456ac9fe8082fdc6d87dd65","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        # remaining_uses is None"},{"line_number":60,"context_line":"        remaining_uses \u003d trust.get(\u0027remaining_uses\u0027)"},{"line_number":61,"context_line":"        if remaining_uses is not None:"},{"line_number":62,"context_line":"            msg \u003d _(\u0027Remaining_uses is set to %s while it must not be \u0027"},{"line_number":63,"context_line":"                    \u0027set in order to redelegate a trust\u0027)"},{"line_number":64,"context_line":"            raise exception.Forbidden(msg % remaining_uses)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6ced46_2e4a8fac","line":62,"in_reply_to":"9a80dd14_55fc793e","updated":"2015-03-24 04:46:09.000000000","message":"This string cannot be changed until Liberty. This is a user-facing exception string that has been translated, please see https://wiki.openstack.org/wiki/StringFreeze for guidelines for post feature/string freeze.","commit_id":"53df52547d50b380a5c09f692c73c39986a8eae9"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"8bf591875e1d7128d456ac9fe8082fdc6d87dd65","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        if remaining_uses is not None:"},{"line_number":62,"context_line":"            msg \u003d _(\u0027Remaining_uses is set to %s while it must not be \u0027"},{"line_number":63,"context_line":"                    \u0027set in order to redelegate a trust\u0027)"},{"line_number":64,"context_line":"            raise exception.Forbidden(msg % remaining_uses)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # expiry times"},{"line_number":67,"context_line":"        trust_expiry \u003d trust.get(\u0027expires_at\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6ced46_8ee9c382","line":64,"updated":"2015-03-24 04:46:09.000000000","message":"Please just change the incorrect use of \u0027,\u0027 to \u0027%\u0027 both here and below. The rest of the changes will need to be in Liberty.","commit_id":"53df52547d50b380a5c09f692c73c39986a8eae9"}]}
