)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20863,"name":"Sharat Sharma","email":"sharat.sharma@in.ibm.com","username":"sharat.sharma"},"change_message_id":"0c0c6125439ad5f6c92b3a5348912d094a6c5892","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modify the function \"_get_spec_version(spec_dict)\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In the function \"_get_spec_version(spec_dict)\",\"str(float(ver))\"will throw a ValueError when the value of the vairable \"ver\" is not number,such as \"aaa\"."},{"line_number":10,"context_line":"And if the value of \"ver\" is \"2.0000\" the function will return \"2.0000\",but it doesn\u0027t make sense ,because when using this function ,it will first check like this \"if _get_spec_version(spec_dict) \u003d\u003d V2_0:\""},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I7dcc582a8c086d1ebc879f9adbeb0fb29fe71941"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5a74a57a_7b677cea","line":10,"range":{"start_line":9,"start_character":0,"end_line":10,"end_character":205},"updated":"2016-11-30 05:55:37.000000000","message":"Please follow the guidelines to write the commit message. The number of characters in a line must not be more than 72. Otherwise it is very difficult to read the message.","commit_id":"09ac4a8139d79a3bfdbba958ee7e7dd1a01b63c0"}],"mistral/workbook/parser.py":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"e2793c8f3ac0da762d9bfc98a812daddffcf426d","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    try:"},{"line_number":66,"context_line":"        str(float(ver))"},{"line_number":67,"context_line":"    except Exception:"},{"line_number":68,"context_line":"        raise exc.DSLParsingException(\u0027Unsupported DSL version: %s\u0027 % ver)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    if not ver or str(float(ver)) not in ALL_VERSIONS:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_71015d39","line":67,"updated":"2016-11-30 07:25:03.000000000","message":"it would be better to use ValueError here.","commit_id":"07b6857c534e576b025905bb4187301362625b46"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"9f9692c1e34a46779c8ba2898c25703ebaaca898","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    except Exception:"},{"line_number":68,"context_line":"        raise exc.DSLParsingException(\u0027Unsupported DSL version: %s\u0027 % ver)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    if not ver or str(float(ver)) not in ALL_VERSIONS:"},{"line_number":71,"context_line":"        raise exc.DSLParsingException(\u0027Unsupported DSL version: %s\u0027 % ver)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    return ver"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_5172a1ae","line":70,"range":{"start_line":70,"start_character":18,"end_line":70,"end_character":33},"updated":"2016-11-30 07:08:00.000000000","message":"We don\u0027t need to do this transformation again. Just assign it to a variable.","commit_id":"07b6857c534e576b025905bb4187301362625b46"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"9f9692c1e34a46779c8ba2898c25703ebaaca898","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        raise exc.DSLParsingException(\u0027Unsupported DSL version: %s\u0027 % ver)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    if not ver or str(float(ver)) not in ALL_VERSIONS:"},{"line_number":71,"context_line":"        raise exc.DSLParsingException(\u0027Unsupported DSL version: %s\u0027 % ver)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    return ver"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_d1b5d131","line":71,"range":{"start_line":71,"start_character":8,"end_line":71,"end_character":74},"updated":"2016-11-30 07:08:00.000000000","message":"This line is the exact same copy of line 68. Please think how to avoid duplication.","commit_id":"07b6857c534e576b025905bb4187301362625b46"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"03beeafee2666b2f1a53093c62fed02c06e5c2a7","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    if \u0027version\u0027 in spec_dict:"},{"line_number":63,"context_line":"        ver \u003d spec_dict[\u0027version\u0027]"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    ver_exception \u003d False"},{"line_number":66,"context_line":"    try:"},{"line_number":67,"context_line":"        if not ver or str(float(ver)) not in ALL_VERSIONS:"},{"line_number":68,"context_line":"          ver_exception \u003d True"},{"line_number":69,"context_line":"    except Exception:"},{"line_number":70,"context_line":"        ver_exception \u003d True"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    if ver_exception:"},{"line_number":73,"context_line":"        raise exc.DSLParsingException(\u0027Unsupported DSL version: %s\u0027 % ver)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    return ver"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_b9ae7be5","line":73,"range":{"start_line":65,"start_character":4,"end_line":73,"end_character":74},"updated":"2016-11-30 07:37:07.000000000","message":"How about this?\n\ndef _raise(ver):\n    raise exc.DSLParsingException(\u0027Unsupported DSL version: %s\u0027 % ver)\n\ntry:\n    str_ver \u003d str(float(ver))\nexcept:\n    _raise(ver)\n\n\nif not ver or str_ver not in ALL_VERSIONS:\n    _raise(ver)","commit_id":"e056d6d6774f0ed20696749296d19f4fcbbb8f98"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"015d810f91d1cd92bf8a7399d71a4c539c8375a0","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        raise exc.DSLParsingException(\u0027Unsupported DSL version: %s\u0027 % ver)"},{"line_number":67,"context_line":"    try:"},{"line_number":68,"context_line":"        str_ver \u003d str(float(ver))"},{"line_number":69,"context_line":"    except Exception:"},{"line_number":70,"context_line":"        _raise(ver)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    if not ver or str_ver not in ALL_VERSIONS:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_0acaa14f","line":69,"updated":"2016-12-08 09:32:10.000000000","message":"Please catch more specific exceptions here. I think ValueError and TypeError are the only types that will be raised here.","commit_id":"7b8e299ab15e0c47461649a6422be302c360a7e4"}]}
