)]}'
{"rally/ui/utils.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"5b62ca46596aff27acfac6da3efb5e5249d5b59c","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        render_kwargs \u003d dict([arg.split(\"\u003d\") for arg in args[2:]])"},{"line_number":54,"context_line":"        print(get_template(args[1]).render(**render_kwargs))"},{"line_number":55,"context_line":"    except ValueError as e:"},{"line_number":56,"context_line":"        print(str(e), file\u003dsys.stderr)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"if __name__ \u003d\u003d \"__main__\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_b86d5634","line":56,"updated":"2015-10-28 03:20:31.000000000","message":"I think this can be done more easily:\n\n    if (len(args) \u003c 2 ...):\n        print(HELP_MESSAGE, file\u003dsys.stderr)\n        return 1\n\n    render_kwargs \u003d ...\n    try:\n        print(get_template(...)....)\n    except mako.Exceptions.TopLevelLookupException as err:\n        print(str(err), file\u003dsys.stderr)\n        return 1\n\nThis avoids throwing unnecessary exceptions and makes error handling more obvious (IMO).","commit_id":"c5d3400670cf129b698d4317a08759363d05983c"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"fe82a47ece17b86ac41d1d128065e58e732a60f4","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        render_kwargs \u003d dict([arg.split(\"\u003d\") for arg in args[2:]])"},{"line_number":54,"context_line":"        print(get_template(args[1]).render(**render_kwargs))"},{"line_number":55,"context_line":"    except ValueError as e:"},{"line_number":56,"context_line":"        print(str(e), file\u003dsys.stderr)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"if __name__ \u003d\u003d \"__main__\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_36cf0db2","line":56,"in_reply_to":"1a26ad4f_b86d5634","updated":"2015-10-28 11:13:57.000000000","message":"@Chris, however it is better to expect ValueError from get_template(), because this function can be is used in another modules, so ValueError unifies exception handling and does not require importing `mako\u0027 in these modules, as well as simplifies introducing Jinja2 in another patch https://review.openstack.org/#/c/239464/2/rally/ui/utils.py,cm","commit_id":"c5d3400670cf129b698d4317a08759363d05983c"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"f98a6e3171cfc73e18b64c0a77fffd75835fcf5d","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        render_kwargs \u003d dict([arg.split(\"\u003d\") for arg in args[2:]])"},{"line_number":54,"context_line":"        print(get_template(args[1]).render(**render_kwargs))"},{"line_number":55,"context_line":"    except ValueError as e:"},{"line_number":56,"context_line":"        print(str(e), file\u003dsys.stderr)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"if __name__ \u003d\u003d \"__main__\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_e3955940","line":56,"in_reply_to":"1a26ad4f_b86d5634","updated":"2015-10-28 10:44:27.000000000","message":"Agreed","commit_id":"c5d3400670cf129b698d4317a08759363d05983c"}]}
