)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"d3ccc157577bd68012db0398ec8a26330f5ddc55","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The token controller doesn\u0027t adhere to the guidance for string translations."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"We fix the string translation keep the log pattern on Keystone."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I60a7a34070a51d3ab186d685c056e8a68460022d"},{"line_number":14,"context_line":"Closes-Bug: #1443912"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa80f949_06cf5cb1","line":11,"updated":"2015-11-03 16:12:28.000000000","message":"I\u0027m a bit unclear as to your goals here.  Is it to just fix any transactions that don\u0027t follow the guidelines or also to add a log entry?","commit_id":"7d1b8592b521e6feccf6c6e12c8298bce177149b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"54fc0acc81285aeeff5dae5f693e78fef64f1f6a","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The token controller doesn\u0027t adhere to the guidance for string translations."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"We fix the string translation keep the log pattern on Keystone."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I60a7a34070a51d3ab186d685c056e8a68460022d"},{"line_number":14,"context_line":"Closes-Bug: #1443912"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa80f949_1dad5be9","line":11,"in_reply_to":"fa80f949_06cf5cb1","updated":"2015-11-04 00:50:55.000000000","message":"In the first moment I\u0027ll just fix the transaction to follow the guidelines, but i saw that the other exception are very similar and I thought in add a log entry for that case.\n\nShould I just add a comment here to explain the log entry addition?","commit_id":"7d1b8592b521e6feccf6c6e12c8298bce177149b"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"db31329328219f2ad3632e4e4908f31702d6f44f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Translation-friendly formatting of msg string"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The token controller doesn\u0027t adhere to the guidance for string translations."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"We fix the string translation keep the log pattern on Keystone."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a8ffd7b_be54c9fd","line":9,"updated":"2015-11-26 18:34:54.000000000","message":"And according to the links Tom posted and Henry\u0027s comment, it still doesn\u0027t, see http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages\n\nI am not saying this change is wrong, but we should be clearer about what we are doing (this is in agreement with what Henry said).\n\nPerhaps \"Message formatting consistency in token controller\" could be a good title ? Since, for me, you are putting the way we build the two messages in conformity. Also keep mentioning you added a warn message.","commit_id":"72a3d0d4681d2b602145bfbfbc239f5fe39e044c"}],"keystone/token/controllers.py":[{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"caed76bde24373f464267cd0e6d9103d9f20e01f","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                role_list \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":390,"context_line":"                    user_id, tenant_id)"},{"line_number":391,"context_line":"            except exception.ProjectNotFound:"},{"line_number":392,"context_line":"                msg \u003d _LW(\u0027Project ID not found: %(t_id)s\u0027)"},{"line_number":393,"context_line":"                LOG.warn(msg % {\u0027t_id\u0027: tenant_id})"},{"line_number":394,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":395,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_5face7ec","line":392,"updated":"2015-10-30 00:11:32.000000000","message":"no, this shouldn\u0027t use LW - since you are using the same message for both the exception and the log.  See hacking guidelines.","commit_id":"f0300ad627899a001b3f9c5ff784460bc7968a13"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"6fea7f4f4345d56c6163160e83091791f94006cb","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                role_list \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":390,"context_line":"                    user_id, tenant_id)"},{"line_number":391,"context_line":"            except exception.ProjectNotFound:"},{"line_number":392,"context_line":"                msg \u003d _LW(\u0027Project ID not found: %(t_id)s\u0027)"},{"line_number":393,"context_line":"                LOG.warn(msg % {\u0027t_id\u0027: tenant_id})"},{"line_number":394,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":395,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_e45f4d3f","line":392,"in_reply_to":"1a26ad4f_5face7ec","updated":"2015-10-30 19:54:04.000000000","message":"I agree with henry. Here is the doc you are talking about: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#choosing-a-marker-function\n\nI would base it off the example in this link and just use just the \u0027_\u0027","commit_id":"f0300ad627899a001b3f9c5ff784460bc7968a13"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"88fdc980cafa4dc918a5904ba80d6ecaa4601306","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                role_list \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":390,"context_line":"                    user_id, tenant_id)"},{"line_number":391,"context_line":"            except exception.ProjectNotFound:"},{"line_number":392,"context_line":"                msg \u003d _LW(\u0027Project ID not found: %(t_id)s\u0027)"},{"line_number":393,"context_line":"                LOG.warn(msg % {\u0027t_id\u0027: tenant_id})"},{"line_number":394,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":395,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_ad4103ab","line":392,"in_reply_to":"1a26ad4f_e45f4d3f","updated":"2015-11-03 00:28:22.000000000","message":"Done","commit_id":"f0300ad627899a001b3f9c5ff784460bc7968a13"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"caed76bde24373f464267cd0e6d9103d9f20e01f","unresolved":false,"context_lines":[{"line_number":394,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"            if not role_list:"},{"line_number":397,"context_line":"                msg \u003d _LW(\u0027User %(u_id)s is unauthorized for tenant %(t_id)s\u0027)"},{"line_number":398,"context_line":"                LOG.warn(msg % {"},{"line_number":399,"context_line":"                    \u0027u_id\u0027: user_id,"},{"line_number":400,"context_line":"                    \u0027t_id\u0027: tenant_id})"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_bf83bb55","line":397,"updated":"2015-10-30 00:11:32.000000000","message":"same here","commit_id":"f0300ad627899a001b3f9c5ff784460bc7968a13"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"88fdc980cafa4dc918a5904ba80d6ecaa4601306","unresolved":false,"context_lines":[{"line_number":394,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"            if not role_list:"},{"line_number":397,"context_line":"                msg \u003d _LW(\u0027User %(u_id)s is unauthorized for tenant %(t_id)s\u0027)"},{"line_number":398,"context_line":"                LOG.warn(msg % {"},{"line_number":399,"context_line":"                    \u0027u_id\u0027: user_id,"},{"line_number":400,"context_line":"                    \u0027t_id\u0027: tenant_id})"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_cd3ebf27","line":397,"in_reply_to":"1a26ad4f_bf83bb55","updated":"2015-11-03 00:28:22.000000000","message":"Done","commit_id":"f0300ad627899a001b3f9c5ff784460bc7968a13"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"d3ccc157577bd68012db0398ec8a26330f5ddc55","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                role_list \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":389,"context_line":"                    user_id, tenant_id)"},{"line_number":390,"context_line":"            except exception.ProjectNotFound:"},{"line_number":391,"context_line":"                msg \u003d _(\u0027Project ID not found: %(t_id)s\u0027) % {\u0027t_id\u0027: tenant_id}"},{"line_number":392,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":393,"context_line":""},{"line_number":394,"context_line":"            if not role_list:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_e67b387a","side":"PARENT","line":391,"updated":"2015-11-03 16:12:28.000000000","message":"as an aside, I don\u0027t think there\u0027s anything wrong with this really - agreed, they don\u0027t have to use the named substitutions (but I don\u0027t think this breaks the guidelines)","commit_id":"65670be476fe3bf99281b56ec72bde1ec2c577d7"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"edeb4fdbdc1efb9e96a577834aa46be5161ecb11","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                    user_id, tenant_id)"},{"line_number":390,"context_line":"            except exception.ProjectNotFound:"},{"line_number":391,"context_line":"                msg \u003d _(\u0027Project ID not found: %s\u0027) % tenant_id"},{"line_number":392,"context_line":"                LOG.warn(msg)"},{"line_number":393,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"            if not role_list:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_ccb31899","line":392,"updated":"2015-11-03 08:45:07.000000000","message":"So it is interesting to look at whether what you have done is closer to the guidance, as opposed to:\n\n msg \u003d _(\u0027Project ID not found: %s\u0027)\n LOG.warn(msg, tenant_id)   # Note comma here!\n raise exception.Unauthorized(msg % tenant_id)\n\nI think your version is preferable, since we know we need to build the full message string even if we are not logging warnings (see examples in http://docs.openstack.org/developer/oslo.i18n/guidelines.html)","commit_id":"7d1b8592b521e6feccf6c6e12c8298bce177149b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"54fc0acc81285aeeff5dae5f693e78fef64f1f6a","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                    user_id, tenant_id)"},{"line_number":390,"context_line":"            except exception.ProjectNotFound:"},{"line_number":391,"context_line":"                msg \u003d _(\u0027Project ID not found: %s\u0027) % tenant_id"},{"line_number":392,"context_line":"                LOG.warn(msg)"},{"line_number":393,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"            if not role_list:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_7dffc701","line":392,"in_reply_to":"1a26ad4f_ccb31899","updated":"2015-11-04 00:50:55.000000000","message":"I\u0027m not sure if I understand your comment here, are you saying that you prefer my version than change for the way that you put in the comment or that I have to change for this way?","commit_id":"7d1b8592b521e6feccf6c6e12c8298bce177149b"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"edeb4fdbdc1efb9e96a577834aa46be5161ecb11","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                LOG.warn(msg % {"},{"line_number":398,"context_line":"                    \u0027u_id\u0027: user_id,"},{"line_number":399,"context_line":"                    \u0027t_id\u0027: tenant_id})"},{"line_number":400,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        return (tenant_ref, role_list)"},{"line_number":403,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_2c516c36","line":400,"updated":"2015-11-03 08:45:07.000000000","message":"however, this isn\u0027t right - since msg won\u0027t have had the substitutions when we raise the exception","commit_id":"7d1b8592b521e6feccf6c6e12c8298bce177149b"},{"author":{"_account_id":11428,"name":"Ajaya Agrawal","email":"ajku.agr@gmail.com","username":"ajayaa"},"change_message_id":"e1aa09c6029eacafbb474cfca3ec2d9e2f95a015","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                LOG.warn(msg % {"},{"line_number":398,"context_line":"                    \u0027u_id\u0027: user_id,"},{"line_number":399,"context_line":"                    \u0027t_id\u0027: tenant_id})"},{"line_number":400,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        return (tenant_ref, role_list)"},{"line_number":403,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_59c1d42d","line":400,"in_reply_to":"1a26ad4f_2c516c36","updated":"2015-11-03 13:26:11.000000000","message":"+1 Henry. I think it should be similar to the first change.\n\nFor e.g.\n msg \u003d _(\u0027User %(u_id)s is unauthorized for tenant %(t_id)s\u0027 % { \u0027u_id\u0027: user_id, \u0027t_id\u0027: tenant_id})","commit_id":"7d1b8592b521e6feccf6c6e12c8298bce177149b"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"015e6663337b7713ccf8e43504aea2e679263d07","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                LOG.warn(msg % {"},{"line_number":398,"context_line":"                    \u0027u_id\u0027: user_id,"},{"line_number":399,"context_line":"                    \u0027t_id\u0027: tenant_id})"},{"line_number":400,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        return (tenant_ref, role_list)"},{"line_number":403,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_7e77d6d4","line":400,"in_reply_to":"1a26ad4f_2c516c36","updated":"2015-11-03 15:43:10.000000000","message":"Henry, Ajaya I am curious on why this wouldn\u0027t work, I tested it and it works for me.  My test is bellow.\n\nHere they are doing something similar to the above Log.warn:\nhttp://git.openstack.org/cgit/openstack/keystone/tree/keystone/resource/core.py#n1262 \n\nIf i drop a break point in this test, which tests the code I linked above here: http://git.openstack.org/cgit/openstack/keystone/tree/keystone/tests/unit/backend/domain_config/core.py#n496\n\nand run \u0027mock_log.warn.call_args_list\u0027, once I hit the break point, it looks like the log works correctly.","commit_id":"7d1b8592b521e6feccf6c6e12c8298bce177149b"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"6a60a90b03163838f226188537902006de26d58c","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                LOG.warn(msg % {"},{"line_number":398,"context_line":"                    \u0027u_id\u0027: user_id,"},{"line_number":399,"context_line":"                    \u0027t_id\u0027: tenant_id})"},{"line_number":400,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        return (tenant_ref, role_list)"},{"line_number":403,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_a3d1a2fd","line":400,"in_reply_to":"fa80f949_20d3683a","updated":"2015-11-03 16:04:41.000000000","message":"Tom - the log message will be fine....it\u0027s that you then issue an exception with msg, rather than the substituted msg.","commit_id":"7d1b8592b521e6feccf6c6e12c8298bce177149b"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"0bb1a8222c4602b9d7579efef270585888d71b5f","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                LOG.warn(msg % {"},{"line_number":398,"context_line":"                    \u0027u_id\u0027: user_id,"},{"line_number":399,"context_line":"                    \u0027t_id\u0027: tenant_id})"},{"line_number":400,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        return (tenant_ref, role_list)"},{"line_number":403,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_20d3683a","line":400,"in_reply_to":"fa80f949_7e77d6d4","updated":"2015-11-03 15:46:22.000000000","message":"Here is the output if you don\u0027t feel like running my little test.\n\n\n[call(u\u0027Found what looks like an unmatched config option substitution reference - domain: 59fa0ecb2fe1437d8c7d905e3f033ff9, group: ldap, option: url, value: my_url/%(passssword)s. Perhaps the config option to which it refers has yet to be added?\u0027)]","commit_id":"7d1b8592b521e6feccf6c6e12c8298bce177149b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"54fc0acc81285aeeff5dae5f693e78fef64f1f6a","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                LOG.warn(msg % {"},{"line_number":398,"context_line":"                    \u0027u_id\u0027: user_id,"},{"line_number":399,"context_line":"                    \u0027t_id\u0027: tenant_id})"},{"line_number":400,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        return (tenant_ref, role_list)"},{"line_number":403,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_dd1a736e","line":400,"in_reply_to":"fa80f949_a3d1a2fd","updated":"2015-11-04 00:50:55.000000000","message":"++ The message in the exception are wrong, I\u0027ll add the parameters in the exception too.","commit_id":"7d1b8592b521e6feccf6c6e12c8298bce177149b"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"b7d6536f3fcccf08be811728bf43c230f2f36ec2","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                LOG.warn(msg % {"},{"line_number":398,"context_line":"                    \u0027u_id\u0027: user_id,"},{"line_number":399,"context_line":"                    \u0027t_id\u0027: tenant_id})"},{"line_number":400,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        return (tenant_ref, role_list)"},{"line_number":403,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_22b21e07","line":400,"in_reply_to":"fa80f949_a3d1a2fd","updated":"2015-11-05 22:32:34.000000000","message":"Henry, thank you for the clarification. I thought you were talking about the log rather than the exception, that was my mistake.","commit_id":"7d1b8592b521e6feccf6c6e12c8298bce177149b"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"2fbc62954d4c8a66072023502211377f1faca391","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                    user_id, tenant_id)"},{"line_number":390,"context_line":"            except exception.ProjectNotFound:"},{"line_number":391,"context_line":"                msg \u003d _(\u0027Project ID not found: %s\u0027) % tenant_id"},{"line_number":392,"context_line":"                LOG.warn(msg)"},{"line_number":393,"context_line":"                raise exception.Unauthorized(msg)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"            if not role_list:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_89768aa2","line":392,"updated":"2015-11-06 04:11:13.000000000","message":"This first part looks nice.","commit_id":"6d9b80b0c7256cd4e45073b156958a02497257ef"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"35a777c824f6852a64dd46f69c8aba78b5c3dfcf","unresolved":false,"context_lines":[{"line_number":396,"context_line":"                msg \u003d _(\u0027User %(u_id)s is unauthorized for tenant %(t_id)s\u0027)"},{"line_number":397,"context_line":"                LOG.warn(msg % {\u0027u_id\u0027: user_id, \u0027t_id\u0027: tenant_id})"},{"line_number":398,"context_line":"                raise exception.Unauthorized(msg % {\u0027u_id\u0027: user_id,"},{"line_number":399,"context_line":"                                                    \u0027t_id\u0027: tenant_id})"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        return (tenant_ref, role_list)"},{"line_number":402,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_22e53edb","line":399,"updated":"2015-11-05 22:37:20.000000000","message":"Raildo, I don\u0027t think this needs to be changed. It seems like this is making the code more confusing.","commit_id":"6d9b80b0c7256cd4e45073b156958a02497257ef"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"1bad6fe52858eb5f71ef5e05363fb233d2e7fb3a","unresolved":false,"context_lines":[{"line_number":396,"context_line":"                msg \u003d _(\u0027User %(u_id)s is unauthorized for tenant %(t_id)s\u0027)"},{"line_number":397,"context_line":"                LOG.warn(msg % {\u0027u_id\u0027: user_id, \u0027t_id\u0027: tenant_id})"},{"line_number":398,"context_line":"                raise exception.Unauthorized(msg % {\u0027u_id\u0027: user_id,"},{"line_number":399,"context_line":"                                                    \u0027t_id\u0027: tenant_id})"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        return (tenant_ref, role_list)"},{"line_number":402,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_30fef938","line":399,"in_reply_to":"fa80f949_0944da47","updated":"2015-11-23 21:44:20.000000000","message":"Samuel, Raildo, it looks like this in is the only way that correctly fixes this bug though.  I think i am going to have to redact may statement from earlier.  I think this is the right way to do it, which fixes the bug and stays with i18n standards. \nhttp://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages","commit_id":"6d9b80b0c7256cd4e45073b156958a02497257ef"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"2fbc62954d4c8a66072023502211377f1faca391","unresolved":false,"context_lines":[{"line_number":396,"context_line":"                msg \u003d _(\u0027User %(u_id)s is unauthorized for tenant %(t_id)s\u0027)"},{"line_number":397,"context_line":"                LOG.warn(msg % {\u0027u_id\u0027: user_id, \u0027t_id\u0027: tenant_id})"},{"line_number":398,"context_line":"                raise exception.Unauthorized(msg % {\u0027u_id\u0027: user_id,"},{"line_number":399,"context_line":"                                                    \u0027t_id\u0027: tenant_id})"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        return (tenant_ref, role_list)"},{"line_number":402,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_0944da47","line":399,"in_reply_to":"fa80f949_22e53edb","updated":"2015-11-06 04:11:13.000000000","message":"I agree in this second part the code is more confusing after the change.\n\nAlso, I think what Henry reported in the bug is that there is something wrong with the pattern used here for translating the error message (with _()) + the substitutions + the exception being raised; something is out of the pattern. I couldn\u0027t understand very well, I\u0027d check with him.","commit_id":"6d9b80b0c7256cd4e45073b156958a02497257ef"}]}
