)]}'
{"trove/db/models.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"e170ea1807ceffaeb568de197f7bdbe265d24af9","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            LOG.error(msg, {\"s_tenant\": context.tenant, \"s_name\": cls.__name__,"},{"line_number":110,"context_line":"                            \"s_owner\": model.tenant_id})"},{"line_number":111,"context_line":"            raise exception.ModelNotFoundError("},{"line_number":112,"context_line":"                _(\"Tenant %(s_tenant)s cannot access %(s_name)s\") % ("},{"line_number":113,"context_line":"                    {\"s_tenant\": context.tenant, \"s_name\": cls.__name__}))"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        return model"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_7ccd0c30","line":112,"updated":"2017-03-05 02:18:12.000000000","message":"why not msg?","commit_id":"cc7c787fbe07f326dd77ee56c1159d50c0037d69"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"07a7d12b4e39e25cf3c820e8fdb00962638d6f01","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            LOG.error(msg, {\"s_tenant\": context.tenant, \"s_name\": cls.__name__,"},{"line_number":110,"context_line":"                            \"s_owner\": model.tenant_id})"},{"line_number":111,"context_line":"            raise exception.ModelNotFoundError("},{"line_number":112,"context_line":"                _(\"Tenant %(s_tenant)s cannot access %(s_name)s\") % ("},{"line_number":113,"context_line":"                    {\"s_tenant\": context.tenant, \"s_name\": cls.__name__}))"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        return model"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_7276e507","line":112,"in_reply_to":"ba2be162_6ed7ebed","updated":"2017-03-06 19:34:40.000000000","message":"Can we use the msg variable in both the exception message and the error message here? The messages are about the same and are on the same logical branch.","commit_id":"cc7c787fbe07f326dd77ee56c1159d50c0037d69"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"1b62ac996725fcf803ae7a5c4f6bb86d1be480f7","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            LOG.error(msg, {\"s_tenant\": context.tenant, \"s_name\": cls.__name__,"},{"line_number":110,"context_line":"                            \"s_owner\": model.tenant_id})"},{"line_number":111,"context_line":"            raise exception.ModelNotFoundError("},{"line_number":112,"context_line":"                _(\"Tenant %(s_tenant)s cannot access %(s_name)s\") % ("},{"line_number":113,"context_line":"                    {\"s_tenant\": context.tenant, \"s_name\": cls.__name__}))"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        return model"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_6ed7ebed","line":112,"in_reply_to":"ba2be162_7ccd0c30","updated":"2017-03-06 16:53:57.000000000","message":"I don\u0027t really know, they differs a little bit, maybe that\u0027s the reason why. As I see, you are the owner of these lines (https://github.com/openstack/trove/blame/master/trove/db/models.py#L112). If we want to change it, that\u0027s okay for me.","commit_id":"cc7c787fbe07f326dd77ee56c1159d50c0037d69"},{"author":{"_account_id":22623,"name":"Erik Olof Gunnar Andersson","email":"eandersson@blizzard.com","username":"eoandersson"},"change_message_id":"0cd7d28f0361ca10e3a9fe5f7d648fb2efc4dc15","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        if ((context and not context.is_admin and hasattr(model, \u0027tenant_id\u0027)"},{"line_number":106,"context_line":"             and model.tenant_id !\u003d context.tenant)):"},{"line_number":107,"context_line":"            msg \u003d _(\"Tenant %(s_tenant)s tried to access \""},{"line_number":108,"context_line":"                    \"%(s_name)s, owned by %(s_owner)s.\") % {"},{"line_number":109,"context_line":"                \"s_tenant\": context.tenant, \"s_name\": cls.__name__,"},{"line_number":110,"context_line":"                \"s_owner\": model.tenant_id}"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_d2b0cfdf","line":108,"updated":"2017-06-05 19:42:18.000000000","message":"Why not move the dictionary to LOG.error(msg, {...})?","commit_id":"0956c1e13441902a5369287374e7f84ed73a460a"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"3f3ed16e3a178908db77df95be9171c1a3f1096e","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        if ((context and not context.is_admin and hasattr(model, \u0027tenant_id\u0027)"},{"line_number":106,"context_line":"             and model.tenant_id !\u003d context.tenant)):"},{"line_number":107,"context_line":"            msg \u003d _(\"Tenant %(s_tenant)s tried to access \""},{"line_number":108,"context_line":"                    \"%(s_name)s, owned by %(s_owner)s.\") % {"},{"line_number":109,"context_line":"                \"s_tenant\": context.tenant, \"s_name\": cls.__name__,"},{"line_number":110,"context_line":"                \"s_owner\": model.tenant_id}"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_0776eb70","line":108,"in_reply_to":"df140735_16f7518d","updated":"2017-06-06 14:07:23.000000000","message":"See the requests at patchset 2.","commit_id":"0956c1e13441902a5369287374e7f84ed73a460a"},{"author":{"_account_id":22623,"name":"Erik Olof Gunnar Andersson","email":"eandersson@blizzard.com","username":"eoandersson"},"change_message_id":"bca2f67fc96f36eaa0d120c3e403f44a97eb396c","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        if ((context and not context.is_admin and hasattr(model, \u0027tenant_id\u0027)"},{"line_number":106,"context_line":"             and model.tenant_id !\u003d context.tenant)):"},{"line_number":107,"context_line":"            msg \u003d _(\"Tenant %(s_tenant)s tried to access \""},{"line_number":108,"context_line":"                    \"%(s_name)s, owned by %(s_owner)s.\") % {"},{"line_number":109,"context_line":"                \"s_tenant\": context.tenant, \"s_name\": cls.__name__,"},{"line_number":110,"context_line":"                \"s_owner\": model.tenant_id}"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_16f7518d","line":108,"in_reply_to":"df140735_96d7e14b","updated":"2017-06-06 04:11:46.000000000","message":"Actually I missed that he is now re-using the message when raising the exception. \n\nMinor, but this will change the message a little bit, as the exception previously said \"cannot access\", and will not say \"tried to access\".","commit_id":"0956c1e13441902a5369287374e7f84ed73a460a"},{"author":{"_account_id":25374,"name":"Chi-Chun Chiang","email":"BaddyChiang@itri.org.tw","username":"BaddyChiang"},"change_message_id":"7e1f3fde3e746b45b1cb905c9b66e8559dfdb284","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        if ((context and not context.is_admin and hasattr(model, \u0027tenant_id\u0027)"},{"line_number":106,"context_line":"             and model.tenant_id !\u003d context.tenant)):"},{"line_number":107,"context_line":"            msg \u003d _(\"Tenant %(s_tenant)s tried to access \""},{"line_number":108,"context_line":"                    \"%(s_name)s, owned by %(s_owner)s.\") % {"},{"line_number":109,"context_line":"                \"s_tenant\": context.tenant, \"s_name\": cls.__name__,"},{"line_number":110,"context_line":"                \"s_owner\": model.tenant_id}"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_96d7e14b","line":108,"in_reply_to":"df140735_d2b0cfdf","updated":"2017-06-06 03:54:28.000000000","message":"I have the same question too. Is there any reason to place the dict outside?","commit_id":"0956c1e13441902a5369287374e7f84ed73a460a"}],"trove/db/sqlalchemy/migrate_repo/schema.py":[{"author":{"_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"},"change_message_id":"04a498eaea2b8e64d1148dc5b32aa0360fcb431d","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def create_tables(tables):"},{"line_number":67,"context_line":"    for table in tables:"},{"line_number":68,"context_line":"        logger.info(\"creating table %(table)s\", {\u0027table\u0027: table})"},{"line_number":69,"context_line":"        table.create()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_f011dbb0","line":68,"range":{"start_line":68,"start_character":8,"end_line":68,"end_character":65},"updated":"2017-03-01 02:48:52.000000000","message":"there","commit_id":"cc7c787fbe07f326dd77ee56c1159d50c0037d69"},{"author":{"_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"},"change_message_id":"04a498eaea2b8e64d1148dc5b32aa0360fcb431d","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def drop_tables(tables):"},{"line_number":73,"context_line":"    for table in tables:"},{"line_number":74,"context_line":"        logger.info(\"dropping table %(table)s\", {\u0027table\u0027: table})"},{"line_number":75,"context_line":"        table.drop()"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_10174fa4","line":74,"range":{"start_line":74,"start_character":7,"end_line":74,"end_character":65},"updated":"2017-03-01 02:48:52.000000000","message":"there","commit_id":"cc7c787fbe07f326dd77ee56c1159d50c0037d69"}],"trove/db/sqlalchemy/migration.py":[{"author":{"_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"},"change_message_id":"04a498eaea2b8e64d1148dc5b32aa0360fcb431d","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    repo_path \u003d get_migrate_repo_path(repo_path)"},{"line_number":60,"context_line":"    sql_connection \u003d options[\u0027database\u0027][\u0027connection\u0027]"},{"line_number":61,"context_line":"    version_str \u003d version or \u0027latest\u0027"},{"line_number":62,"context_line":"    logger.info(\"Upgrading %(sql_connection)s to version %(version_str)s\","},{"line_number":63,"context_line":"                {\u0027sql_connection\u0027: sql_connection, \u0027version_str\u0027: version_str})"},{"line_number":64,"context_line":"    return versioning_api.upgrade(sql_connection, repo_path, version)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_7026cb17","line":62,"range":{"start_line":62,"start_character":4,"end_line":62,"end_character":74},"updated":"2017-03-01 02:48:52.000000000","message":"there","commit_id":"cc7c787fbe07f326dd77ee56c1159d50c0037d69"}]}
