)]}'
{"dragonflow/neutron/common/dhcp_opt_map.py":[{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"bdbea0e80769d2e55e12786981e1b7b53e911c11","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        if dhcp.is_tag_valid(user_tag_int):"},{"line_number":211,"context_line":"            return user_tag_int"},{"line_number":212,"context_line":"    except ValueError:"},{"line_number":213,"context_line":"        msg \u003d _(\"{0} has error integer types and \""},{"line_number":214,"context_line":"                \"should be between 0 and 255\").format(user_tag_int)"},{"line_number":215,"context_line":"        LOG.exception(msg)"},{"line_number":216,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f4e5783_c5871fb5","line":213,"updated":"2017-10-15 07:10:18.000000000","message":"it\u0027s not must be an error , as thec tag can be also get by the from the maps (The maps are according to dhcpd and dnsmasq tags names), \nMaybe you can add an error msg if line 220 returns NULL.","commit_id":"27cc9dedaf2782e8db78ee5a5837f3c310fc75dd"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"01213116ff584676a6bc18aa6f6612683faf0676","unresolved":false,"context_lines":[{"line_number":215,"context_line":"    if usr_tag \u003d\u003d const.DHCP_SIADDR:"},{"line_number":216,"context_line":"        return usr_tag"},{"line_number":217,"context_line":"    try:"},{"line_number":218,"context_line":"        if opt_mapping.get(usr_tag):"},{"line_number":219,"context_line":"            usr_tag_mapps \u003d opt_mapping.get(usr_tag)"},{"line_number":220,"context_line":"    except ValueError:"},{"line_number":221,"context_line":"        msg \u003d _(\"The value of {0} in dhcpd and dnsmasq tags \""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f4b6375_4e1bcb1a","line":218,"updated":"2017-10-19 06:04:16.000000000","message":"Hi, get will return null i the argument not exist it will not throw an exception","commit_id":"e870a21c437496a80f7426b3c33fdfffc3397023"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"46fd8dd25631dd7af9d90f2957823d6ee91f2aa5","unresolved":false,"context_lines":[{"line_number":215,"context_line":"    if usr_tag \u003d\u003d const.DHCP_SIADDR:"},{"line_number":216,"context_line":"        return usr_tag"},{"line_number":217,"context_line":"    if opt_mapping.get(usr_tag):"},{"line_number":218,"context_line":"        usr_tag_mapps \u003d opt_mapping.get(usr_tag)"},{"line_number":219,"context_line":"    else:"},{"line_number":220,"context_line":"        msg \u003d _(\"The value of {0} in dhcpd and dnsmasq tags \""},{"line_number":221,"context_line":"                \"should not be null\").format(usr_tag)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_fed1fa58","line":218,"updated":"2017-10-19 13:17:27.000000000","message":"opt_mapping.get redundant","commit_id":"c097330e8a879e3d20efaace709914aa7ce1d80c"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"46fd8dd25631dd7af9d90f2957823d6ee91f2aa5","unresolved":false,"context_lines":[{"line_number":217,"context_line":"    if opt_mapping.get(usr_tag):"},{"line_number":218,"context_line":"        usr_tag_mapps \u003d opt_mapping.get(usr_tag)"},{"line_number":219,"context_line":"    else:"},{"line_number":220,"context_line":"        msg \u003d _(\"The value of {0} in dhcpd and dnsmasq tags \""},{"line_number":221,"context_line":"                \"should not be null\").format(usr_tag)"},{"line_number":222,"context_line":"        LOG.exception(msg)"},{"line_number":223,"context_line":"    return usr_tag_mapps"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_7ec50a8e","line":220,"updated":"2017-10-19 13:17:27.000000000","message":"this patch will cause exception as usr_tag_mapps not exist","commit_id":"c097330e8a879e3d20efaace709914aa7ce1d80c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"6317bb5a0b86c46b2e77c3935d0d7093101adaae","unresolved":false,"context_lines":[{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    if usr_tag \u003d\u003d const.DHCP_SIADDR:"},{"line_number":216,"context_line":"        return usr_tag"},{"line_number":217,"context_line":"    if opt_mapping.get(usr_tag):"},{"line_number":218,"context_line":"        usr_tag_mapps \u003d opt_mapping.get(usr_tag)"},{"line_number":219,"context_line":"    else:"},{"line_number":220,"context_line":"        msg \u003d _(\"The value of {0} in dhcpd and dnsmasq tags \""},{"line_number":221,"context_line":"                \"should not be null\").format(usr_tag)"},{"line_number":222,"context_line":"        LOG.exception(msg)"},{"line_number":223,"context_line":"    return usr_tag_mapps"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_d951b810","line":222,"range":{"start_line":217,"start_character":0,"end_line":222,"end_character":26},"updated":"2017-10-19 13:52:57.000000000","message":"Maybe something along the lines of?:\ntry:\n    usr_tag_mapps \u003d opt_mapping[usr_tag]\n    return usr_tag_mapps\nexcept KeyError:\n    msg \u003d ...\n    LOG.error(...)\nreturn None\n\nThis way, usr_tag is only looked up once, and usr_tag_mapps is referenced only if it was defined?","commit_id":"c097330e8a879e3d20efaace709914aa7ce1d80c"}]}
