)]}'
{"rally/benchmark/scenarios/base.py":[{"author":{"_account_id":9180,"name":"Olga Kopylova","email":"olkonami@gmail.com","username":"olkonami"},"change_message_id":"e090398494dc9c3e296f072cf7d894513706e6d8","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        else:"},{"line_number":95,"context_line":"            scenario_group, scenario_name \u003d None, name"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if scenario_group:"},{"line_number":98,"context_line":"            scenario_cls \u003d Scenario.get_by_name(scenario_group)"},{"line_number":99,"context_line":"            if hasattr(scenario_cls, scenario_name):"},{"line_number":100,"context_line":"                return getattr(scenario_cls, scenario_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_770f7f37","line":97,"updated":"2014-09-04 16:58:37.000000000","message":"We can use one if-else block to handle all logic in this function","commit_id":"2be0f0d5eb7b8e47b1c0bcded15276f22f1d9634"}],"rally/cmd/commands/info.py":[{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"3ad645ade3d7c2e681d7892533a239234562055e","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        :param query: search query."},{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        try:"},{"line_number":56,"context_line":"            scenario_group \u003d scenario_base.Scenario.get_by_name(query)"},{"line_number":57,"context_line":"            print(\"%s (benchmark scenario group).\\n\" % scenario_group.__name__)"},{"line_number":58,"context_line":"            doc \u003d utils.format_docstring(scenario_group.__doc__)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_f125e90a","line":55,"updated":"2014-09-01 09:46:39.000000000","message":"NIT: \nI dislike the idea of several blocks:\n    try:\n        ...\n    except: \n        pass\n\nThis architecture is similar to \"find_resource\" from common code[*]. When I tried to reuse it in several python-*client, it was painful:(\n\nCan we redesign this?\n\n[*] - https://github.com/openstack/oslo-incubator/blob/master/openstack/common/cliutils.py#L220-L285","commit_id":"2be0f0d5eb7b8e47b1c0bcded15276f22f1d9634"},{"author":{"_account_id":9180,"name":"Olga Kopylova","email":"olkonami@gmail.com","username":"olkonami"},"change_message_id":"e090398494dc9c3e296f072cf7d894513706e6d8","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            doc \u003d utils.format_docstring(scenario_group.__doc__)"},{"line_number":59,"context_line":"            print(doc)"},{"line_number":60,"context_line":"            return"},{"line_number":61,"context_line":"        except exceptions.NoSuchScenario:"},{"line_number":62,"context_line":"            pass"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_7a44c649","line":61,"updated":"2014-09-04 16:58:37.000000000","message":"Handling exception with \"pass\" leads to the Dark Side","commit_id":"2be0f0d5eb7b8e47b1c0bcded15276f22f1d9634"},{"author":{"_account_id":9180,"name":"Olga Kopylova","email":"olkonami@gmail.com","username":"olkonami"},"change_message_id":"2c501fd4398ca70917de5fc0b505369b25127410","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            info +\u003d utils.format_docstring(scenario_group.__doc__)"},{"line_number":70,"context_line":"            return info"},{"line_number":71,"context_line":"        except exceptions.NoSuchScenario:"},{"line_number":72,"context_line":"            return None"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_scenario_info(self, query):"},{"line_number":75,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_d984cb0c","line":72,"updated":"2014-09-05 08:38:25.000000000","message":"This is a bit more clear but has the same result as handling with pass - we just get None without any explanations.\n\nI think It will be more clear to have some notification from this methods that scenario is not found. May be it\u0027s better not to handle this exception here at all and handle it in higher level where this methods are called.","commit_id":"6985e8d4f54591041e128562183fb521a90a1c5b"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"73b50d0269f79d5676c9761867583b4879a2b96d","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            info +\u003d utils.format_docstring(scenario_group.__doc__)"},{"line_number":70,"context_line":"            return info"},{"line_number":71,"context_line":"        except exceptions.NoSuchScenario:"},{"line_number":72,"context_line":"            return None"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_scenario_info(self, query):"},{"line_number":75,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_90ecd02b","line":72,"in_reply_to":"fa98f980_658a4c65","updated":"2014-09-05 11:24:25.000000000","message":"What do you mean? We print a special text to the CLI in case we can\u0027t get any docs for the input query (see L61), but the user isn\u0027t interested at all, which exceptions occur inside these methods. It is just implementation detail","commit_id":"6985e8d4f54591041e128562183fb521a90a1c5b"},{"author":{"_account_id":9180,"name":"Olga Kopylova","email":"olkonami@gmail.com","username":"olkonami"},"change_message_id":"d92010b9b1ffe02ac67943bf797cbb571760464c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            info +\u003d utils.format_docstring(scenario_group.__doc__)"},{"line_number":70,"context_line":"            return info"},{"line_number":71,"context_line":"        except exceptions.NoSuchScenario:"},{"line_number":72,"context_line":"            return None"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_scenario_info(self, query):"},{"line_number":75,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_d059f88e","line":72,"in_reply_to":"fa98f980_90ecd02b","updated":"2014-09-05 11:46:10.000000000","message":"Oh yes, my fault, didn\u0027t understand that functions are just inner. Sorry.","commit_id":"6985e8d4f54591041e128562183fb521a90a1c5b"},{"author":{"_account_id":9180,"name":"Olga Kopylova","email":"olkonami@gmail.com","username":"olkonami"},"change_message_id":"70d0d89e2d99827f8bbeb74018116656dbac579c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            info +\u003d utils.format_docstring(scenario_group.__doc__)"},{"line_number":70,"context_line":"            return info"},{"line_number":71,"context_line":"        except exceptions.NoSuchScenario:"},{"line_number":72,"context_line":"            return None"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_scenario_info(self, query):"},{"line_number":75,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_658a4c65","line":72,"in_reply_to":"fa98f980_bc59b58f","updated":"2014-09-05 10:43:14.000000000","message":"\u003e That\u0027s exactly what I did in the previous patchset and received -1 for this. We should handle these exceptions either here or in find(), otherwise it will be thrown directly to the console...\n\nOk, then we need some output here","commit_id":"6985e8d4f54591041e128562183fb521a90a1c5b"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"47ebad9441af0ff5f920ceae54525a39e86859d8","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            info +\u003d utils.format_docstring(scenario_group.__doc__)"},{"line_number":70,"context_line":"            return info"},{"line_number":71,"context_line":"        except exceptions.NoSuchScenario:"},{"line_number":72,"context_line":"            return None"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_scenario_info(self, query):"},{"line_number":75,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_ff4def3e","line":72,"in_reply_to":"fa98f980_bc59b58f","updated":"2014-09-05 09:33:40.000000000","message":"\u003eIsn\u0027t \"None\" a kind of clear notification that scenario is not found??\n\n+1\n\n\u003eWe should handle these exceptions either here or in find()\n\nI prefer to catch all possible exceptions in _get_scenatio_*.","commit_id":"6985e8d4f54591041e128562183fb521a90a1c5b"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"a6749a570def825adc16f624ecc3bb565d852712","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            info +\u003d utils.format_docstring(scenario_group.__doc__)"},{"line_number":70,"context_line":"            return info"},{"line_number":71,"context_line":"        except exceptions.NoSuchScenario:"},{"line_number":72,"context_line":"            return None"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_scenario_info(self, query):"},{"line_number":75,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_bc59b58f","line":72,"in_reply_to":"fa98f980_d984cb0c","updated":"2014-09-05 09:17:13.000000000","message":"Isn\u0027t \"None\" a kind of clear notification that scenario is not found??\n\n\u003e \"Handle it in higher level where this methods are called\"\nThat\u0027s exactly what I did in the previous patchset and received -1 for this. We should handle these exceptions either here or in find(), otherwise it will be thrown directly to the console...","commit_id":"6985e8d4f54591041e128562183fb521a90a1c5b"}]}
