)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"e1782e28b52a35d95ac0747154411c33909539fb","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Also fixed test case root_on_create.py by not"},{"line_number":10,"context_line":"having any dependency on previous test cases for"},{"line_number":11,"context_line":"db instance creation and root user creation."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I5b2f665cfdb36e9f88d57d04b5e9470085b3362a"},{"line_number":14,"context_line":"Fixes: Bug 1276858"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAVn%2F%2F1Ws%3D","line":11,"updated":"2014-03-03 21:43:50.000000000","message":"Reason:\nNot each datastore has root user entity;\n\nChanges:\nroot_on_create flag per datastore.\nfixed test case root_on_create;","commit_id":"cbf52fb82718d92057e0f49e08d757165a618861"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"e1782e28b52a35d95ac0747154411c33909539fb","unresolved":false,"context_lines":[{"line_number":11,"context_line":"db instance creation and root user creation."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I5b2f665cfdb36e9f88d57d04b5e9470085b3362a"},{"line_number":14,"context_line":"Fixes: Bug 1276858"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAVn%2F%2F1Xg%3D","line":14,"updated":"2014-03-03 21:43:50.000000000","message":"Closes-Bug: #1276858","commit_id":"cbf52fb82718d92057e0f49e08d757165a618861"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"47ce11dddba9a601ede599eff0ee68e030793ae8","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Reason: Not each datastore has root user entity;"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Changes: root_on_create flag per datastore."},{"line_number":10,"context_line":"fixed test case root_on_create;"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I5b2f665cfdb36e9f88d57d04b5e9470085b3362a"},{"line_number":13,"context_line":"Closes-Bug: #1276858"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAVn%2F%2F0%2BE%3D","line":10,"updated":"2014-03-03 22:25:12.000000000","message":"I suggested commit body, not the commit title.\nPlease set this as commit title:\nRoot_on_create per datastore","commit_id":"568c33bf4d2fcf3484b2379b4d6cf03e65cb8540"}],"trove/instance/models.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"85a7aeb323820e8fa620d93e187047a5ef1d8476","unresolved":false,"context_lines":[{"line_number":542,"context_line":"            try:"},{"line_number":543,"context_line":"                root_on_create \u003d CONF.get(datastore_manager).root_on_create"},{"line_number":544,"context_line":"                return root_on_create"},{"line_number":545,"context_line":"            except NoSuchOptError:"},{"line_number":546,"context_line":"                LOG.debug(_(\"root_on_create not configured for %s\""},{"line_number":547,"context_line":"                            \" hence defaulting the value to False\")"},{"line_number":548,"context_line":"                          % datastore_manager)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAVn%2F%2FvUg%3D","line":545,"updated":"2014-03-04 11:22:39.000000000","message":"i don\u0027t see where it was imported","commit_id":"ebbb2b8019f44912f3e0c30489c26a3f2805566c"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"706db9cb19b7805dd44b5e8bfae61701c2db6e28","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import re"},{"line_number":20,"context_line":"from datetime import datetime"},{"line_number":21,"context_line":"from oslo.config.cfg import NoSuchOptError"},{"line_number":22,"context_line":"from novaclient import exceptions as nova_exceptions"},{"line_number":23,"context_line":"from trove.common import cfg"},{"line_number":24,"context_line":"from trove.common import exception"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FuA8%3D","line":21,"updated":"2014-03-04 14:15:44.000000000","message":"should follow right after novaclient import","commit_id":"6b3080986e62076c9850e864f508e6edbe409f1d"},{"author":{"_account_id":6162,"name":"Dan Nguyen","email":"dan.nguyens.mail@gmail.com","username":"daniel-a-nguyen"},"change_message_id":"3058384ff64e444d8ff62cee79bcb565689b9b96","unresolved":false,"context_lines":[{"line_number":500,"context_line":""},{"line_number":501,"context_line":"    \"\"\""},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    @classmethod"},{"line_number":504,"context_line":"    def get_root_on_create(cls, datastore_manager):"},{"line_number":505,"context_line":"        try:"},{"line_number":506,"context_line":"            root_on_create \u003d CONF.get(datastore_manager).root_on_create"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVn%2F%2FnpQ%3D","line":503,"updated":"2014-03-05 01:31:37.000000000","message":"I think you might be able to avoid the exception if you do something like this:\n\ndm \u003d CONF.get(datastore_manager, None)\nroot_on_create \u003d False\nif dm is not None:\n   root_on_create \u003d dm.get(\u0027root_on_create\u0027, False)\n   # log debug goes here perhaps\nreturn root_on_create","commit_id":"d7519041a93348a1d2b9c8733c98f339d3366066"},{"author":{"_account_id":6162,"name":"Dan Nguyen","email":"dan.nguyens.mail@gmail.com","username":"daniel-a-nguyen"},"change_message_id":"726bf231076860deba6c0026b44836e1f134f219","unresolved":false,"context_lines":[{"line_number":500,"context_line":""},{"line_number":501,"context_line":"    \"\"\""},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    @classmethod"},{"line_number":504,"context_line":"    def get_root_on_create(cls, datastore_manager):"},{"line_number":505,"context_line":"        try:"},{"line_number":506,"context_line":"            root_on_create \u003d CONF.get(datastore_manager).root_on_create"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVn%2F%2FdsI%3D","line":503,"in_reply_to":"AAAAVn%2F%2FjkE%3D","updated":"2014-03-05 23:05:42.000000000","message":"Thanks for the link.  It\u0027s more of a preference thing which is why I removed my -1.  I tend to favor checking for cases that I know how to handle.  \n\nIn this case it looks like it\u0027s pretty clear how the exception should be handled (some logging and returning False) so why not just handle it.\n\nIn other words, what is there to be gained by wrapping everything in a try/except block and handling the exception after it\u0027s encountered?","commit_id":"d7519041a93348a1d2b9c8733c98f339d3366066"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"ddf11bddd29f235248065f10e8d2058a9f41a48a","unresolved":false,"context_lines":[{"line_number":500,"context_line":""},{"line_number":501,"context_line":"    \"\"\""},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    @classmethod"},{"line_number":504,"context_line":"    def get_root_on_create(cls, datastore_manager):"},{"line_number":505,"context_line":"        try:"},{"line_number":506,"context_line":"            root_on_create \u003d CONF.get(datastore_manager).root_on_create"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVn%2F%2FjkE%3D","line":503,"in_reply_to":"AAAAVn%2F%2Fnmk%3D","updated":"2014-03-05 12:41:09.000000000","message":"Why would you want to avoid the exception? It\u0027s more pythonic to code with exceptions. The normal flow of the code is in the try branch, while the alternative is in the except. http://docs.python.org/2/glossary.html#term-eafp","commit_id":"d7519041a93348a1d2b9c8733c98f339d3366066"},{"author":{"_account_id":6162,"name":"Dan Nguyen","email":"dan.nguyens.mail@gmail.com","username":"daniel-a-nguyen"},"change_message_id":"fed476943c88c775d38cf62d79cd3aaa0d5aa23b","unresolved":false,"context_lines":[{"line_number":500,"context_line":""},{"line_number":501,"context_line":"    \"\"\""},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    @classmethod"},{"line_number":504,"context_line":"    def get_root_on_create(cls, datastore_manager):"},{"line_number":505,"context_line":"        try:"},{"line_number":506,"context_line":"            root_on_create \u003d CONF.get(datastore_manager).root_on_create"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVn%2F%2Fnmk%3D","line":503,"in_reply_to":"AAAAVn%2F%2FnpQ%3D","updated":"2014-03-05 01:36:29.000000000","message":"actually after looking at it doesn\u0027t look like that will work.\nbut the following might.\n...\nif hasattr(dm, \u0027root_on_create\u0027):\n...","commit_id":"d7519041a93348a1d2b9c8733c98f339d3366066"},{"author":{"_account_id":6162,"name":"Dan Nguyen","email":"dan.nguyens.mail@gmail.com","username":"daniel-a-nguyen"},"change_message_id":"2b5169d1ad9f0fcd9a93fdaa744b7c46b0013e9a","unresolved":false,"context_lines":[{"line_number":504,"context_line":"    def get_root_on_create(cls, datastore_manager):"},{"line_number":505,"context_line":"        try:"},{"line_number":506,"context_line":"            root_on_create \u003d CONF.get(datastore_manager).root_on_create"},{"line_number":507,"context_line":"            return root_on_create"},{"line_number":508,"context_line":"        except NoSuchOptError:"},{"line_number":509,"context_line":"            LOG.debug(_(\"root_on_create not configured for %s\""},{"line_number":510,"context_line":"                        \" hence defaulting the value to False\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAVn%2F%2B%2Br0%3D","line":507,"updated":"2014-03-10 22:05:59.000000000","message":"I just have nit pic but it\u0027s not a big deal.\n\nreturn CONF.get(datastore_manager).root_on_create","commit_id":"ce6e24bb86de1360de930491ab226079dd84ce33"}],"trove/tests/api/root_on_create.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"e1782e28b52a35d95ac0747154411c33909539fb","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @before_class"},{"line_number":71,"context_line":"    def setUp(self):"},{"line_number":72,"context_line":"        self.orig_conf_value \u003d CONF.get(instance_info.dbaas_datastore)\\"},{"line_number":73,"context_line":"            .root_on_create"},{"line_number":74,"context_line":"        CONF.get(instance_info.dbaas_datastore).root_on_create \u003d True"},{"line_number":75,"context_line":"        self.dbaas \u003d util.create_dbaas_client(instance_info.user)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2F1X0%3D","line":72,"updated":"2014-03-03 21:43:50.000000000","message":"do not use \\","commit_id":"cbf52fb82718d92057e0f49e08d757165a618861"}]}
