)]}'
{"trove/guestagent/datastore/mysql/service.py":[{"author":{"_account_id":6162,"name":"Dan Nguyen","email":"dan.nguyens.mail@gmail.com","username":"daniel-a-nguyen"},"change_message_id":"9bf51e21cbe8d9a11281ea870144dd8de0e572f1","unresolved":false,"context_lines":[{"line_number":383,"context_line":"            for database in databases:"},{"line_number":384,"context_line":"                    try:"},{"line_number":385,"context_line":"                        mydb.name \u003d database"},{"line_number":386,"context_line":"                    except ValueError:"},{"line_number":387,"context_line":"                        raise exception.BadRequest(_("},{"line_number":388,"context_line":"                            \"Grant access to %s is not allowed\") % database)"},{"line_number":389,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2Fou4%3D","line":386,"updated":"2014-02-11 20:39:17.000000000","message":"This is a good catch.  Thanks for finding it.\nI would prefer rethrowing the exception in this case because you are only adding a logging message.\n\nSomething like this maybe?\n...\n\nexcept ValueError as ve:\n   LOG.info(_( \"Grant access to %s is not allowed\") % database)\nraise ve \n...","commit_id":"4c8ef841d3580c9bb9a97f50f36a42686c3de8ab"},{"author":{"_account_id":6162,"name":"Dan Nguyen","email":"dan.nguyens.mail@gmail.com","username":"daniel-a-nguyen"},"change_message_id":"18066c5d4f83db6e0f6f012ac21d137b6a52f749","unresolved":false,"context_lines":[{"line_number":383,"context_line":"            for database in databases:"},{"line_number":384,"context_line":"                    try:"},{"line_number":385,"context_line":"                        mydb.name \u003d database"},{"line_number":386,"context_line":"                    except ValueError:"},{"line_number":387,"context_line":"                        raise exception.BadRequest(_("},{"line_number":388,"context_line":"                            \"Grant access to %s is not allowed\") % database)"},{"line_number":389,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2Fotk%3D","line":386,"in_reply_to":"AAAAUX%2F%2Fou4%3D","updated":"2014-02-11 20:42:24.000000000","message":"if you want to keep it like the above _get_user method that\u0027s fine too.","commit_id":"4c8ef841d3580c9bb9a97f50f36a42686c3de8ab"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"a22584dadcc6e77a9110751960ff18e0fe845d9e","unresolved":false,"context_lines":[{"line_number":384,"context_line":"                    try:"},{"line_number":385,"context_line":"                        mydb.name \u003d database"},{"line_number":386,"context_line":"                    except ValueError:"},{"line_number":387,"context_line":"                        raise exception.BadRequest(_("},{"line_number":388,"context_line":"                            \"Grant access to %s is not allowed\") % database)"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"                    g \u003d sql_query.Grant(permissions\u003d\u0027ALL\u0027, database\u003dmydb.name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2FtUc%3D","line":387,"updated":"2014-02-11 10:23:28.000000000","message":"raise exception.BadRequest(message\u003d_(\"Grant access to %s is not allowed\") % database)","commit_id":"4c8ef841d3580c9bb9a97f50f36a42686c3de8ab"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"c1fb5859df20c168c1157b4ac42ffb51ef78b51a","unresolved":false,"context_lines":[{"line_number":384,"context_line":"                    try:"},{"line_number":385,"context_line":"                        mydb.name \u003d database"},{"line_number":386,"context_line":"                    except ValueError:"},{"line_number":387,"context_line":"                        raise exception.BadRequest(_("},{"line_number":388,"context_line":"                            \"Grant access to %s is not allowed\") % database)"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"                    g \u003d sql_query.Grant(permissions\u003d\u0027ALL\u0027, database\u003dmydb.name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2FokI%3D","line":387,"in_reply_to":"AAAAUX%2F%2ForI%3D","updated":"2014-02-11 21:04:37.000000000","message":"Denis, I compared the results by locally making it message\u003d.....\n\nresults were same.","commit_id":"4c8ef841d3580c9bb9a97f50f36a42686c3de8ab"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fb36d656ab504673043d444243c04fd0efbfb4ac","unresolved":false,"context_lines":[{"line_number":384,"context_line":"                    try:"},{"line_number":385,"context_line":"                        mydb.name \u003d database"},{"line_number":386,"context_line":"                    except ValueError:"},{"line_number":387,"context_line":"                        raise exception.BadRequest(_("},{"line_number":388,"context_line":"                            \"Grant access to %s is not allowed\") % database)"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"                    g \u003d sql_query.Grant(permissions\u003d\u0027ALL\u0027, database\u003dmydb.name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2ForI%3D","line":387,"in_reply_to":"AAAAUX%2F%2FrDM%3D","updated":"2014-02-11 20:48:28.000000000","message":"I would not say that its all the same, please take a look to OpenStackException class and take a look at TroveError class (which is inherited from OpenStackException).","commit_id":"4c8ef841d3580c9bb9a97f50f36a42686c3de8ab"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"cf3ac8468ec3a084083103289814fd161054efa8","unresolved":false,"context_lines":[{"line_number":384,"context_line":"                    try:"},{"line_number":385,"context_line":"                        mydb.name \u003d database"},{"line_number":386,"context_line":"                    except ValueError:"},{"line_number":387,"context_line":"                        raise exception.BadRequest(_("},{"line_number":388,"context_line":"                            \"Grant access to %s is not allowed\") % database)"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"                    g \u003d sql_query.Grant(permissions\u003d\u0027ALL\u0027, database\u003dmydb.name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2FrDM%3D","line":387,"in_reply_to":"AAAAUX%2F%2FtUc%3D","updated":"2014-02-11 15:52:24.000000000","message":"I would say both are ok, there are many instances in current code for this, its generally used like that.\n\nBadRequest(_(\"blah blah blah))","commit_id":"4c8ef841d3580c9bb9a97f50f36a42686c3de8ab"}]}
