)]}'
{"tripleoclient/utils.py":[{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"a763d83c92659d0d9d26e21e00773e363e2c0da6","unresolved":false,"context_lines":[{"line_number":37,"context_line":"import time"},{"line_number":38,"context_line":"import yaml"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"from collections.abc import Iterable"},{"line_number":41,"context_line":"from heatclient.common import event_utils"},{"line_number":42,"context_line":"from heatclient.common import template_utils"},{"line_number":43,"context_line":"from heatclient.common import utils as heat_utils"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_74b3954e","line":40,"range":{"start_line":40,"start_character":0,"end_line":40,"end_character":36},"updated":"2019-06-21 17:50:29.000000000","message":"This will only work on python3. I wanted to have that version in the patch set for comparison purposes since it requires less code. I\u0027ll submit another PS which works with both python2 and python3.","commit_id":"24dd7754dbf541b65842c0234815eaa9da030617"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"1abf4ec890ab7aa66f6d79eecdebd79bd4b36f28","unresolved":false,"context_lines":[{"line_number":37,"context_line":"import time"},{"line_number":38,"context_line":"import yaml"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"from collections.abc import Iterable"},{"line_number":41,"context_line":"from heatclient.common import event_utils"},{"line_number":42,"context_line":"from heatclient.common import template_utils"},{"line_number":43,"context_line":"from heatclient.common import utils as heat_utils"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_2a34d6fa","line":40,"range":{"start_line":40,"start_character":0,"end_line":40,"end_character":36},"in_reply_to":"9fb8cfa7_74b3954e","updated":"2019-06-21 21:11:36.000000000","message":"as expected:\n\nhttp://logs.openstack.org/95/666895/1/check/openstack-tox-py27/3ce8e08/job-output.txt.gz#_2019-06-21_18_30_09_433745","commit_id":"24dd7754dbf541b65842c0234815eaa9da030617"},{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"fdf054b42332665a808bfa292ea9a9f61158605d","unresolved":false,"context_lines":[{"line_number":1876,"context_line":"        content \u003d yaml.load(open(env_file))"},{"line_number":1877,"context_line":"        deprecated_services_enabled \u003d []"},{"line_number":1878,"context_line":"        for service in constants.DEPRECATED_SERVICES.keys():"},{"line_number":1879,"context_line":"            try:"},{"line_number":1880,"context_line":"                if (\"resource_registry\" in content and"},{"line_number":1881,"context_line":"                        service in content[\"resource_registry\"]):"},{"line_number":1882,"context_line":"                    if content[\"resource_registry\"][service] !\u003d \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_19636a1c","line":1879,"updated":"2019-06-22 15:58:33.000000000","message":"I think best would be to have this piece of code to either use \"safe ifs\" or try/except\n\none option to avoid try/except could be:\n\n  if \"resource_registry\" in content and content[\"resource_registry\"]:\n    for service in constants.DEPRECATED_SERVICES.keys():\n      if service in content[\"resource_registry\"] and content[\"resource_registry\"][service] !\u003d \"OS::Heat::None\":\n        LOG.warn\n\nalternatively to rely on try/except instead\n\n  for service in constants.DEPRECATED_SERVICES.keys():\n    try:\n      if content[\"resource_registry\"][service] !\u003d \"OS::Heat::None\":\n        LOG.warn\n    except (KeyError, TypeError) as e:\n      pass\n\nI think I prefer the latter","commit_id":"aa9cc0b17506b4494e2dc75cae9f3e5d3e6c2d7d"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"3eebffb3e5d491825e73ced5236645560176bca4","unresolved":false,"context_lines":[{"line_number":1876,"context_line":"        content \u003d yaml.load(open(env_file))"},{"line_number":1877,"context_line":"        deprecated_services_enabled \u003d []"},{"line_number":1878,"context_line":"        for service in constants.DEPRECATED_SERVICES.keys():"},{"line_number":1879,"context_line":"            try:"},{"line_number":1880,"context_line":"                if (\"resource_registry\" in content and"},{"line_number":1881,"context_line":"                        service in content[\"resource_registry\"]):"},{"line_number":1882,"context_line":"                    if content[\"resource_registry\"][service] !\u003d \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_dfc60817","line":1879,"in_reply_to":"9fb8cfa7_19636a1c","updated":"2019-06-24 12:31:36.000000000","message":"Done","commit_id":"aa9cc0b17506b4494e2dc75cae9f3e5d3e6c2d7d"}]}
