)]}'
{"os_brick/initiator/connectors/fibre_channel.py":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"38aede208688085b6a5c7bbaa5d18c50b7b6bd2b","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            wwpn_lun_map[wwpn] \u003d lun"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        # If there is an initiator_target_map we can update it too"},{"line_number":119,"context_line":"        if connection_properties.get(\u0027initiator_target_map\u0027) is not None:"},{"line_number":120,"context_line":"            itmap \u003d connection_properties[\u0027initiator_target_map\u0027]"},{"line_number":121,"context_line":"            new_itmap \u003d dict()"},{"line_number":122,"context_line":"            for init_wwpn in itmap:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_da788c90","line":119,"range":{"start_line":119,"start_character":11,"end_line":119,"end_character":72},"updated":"2019-02-07 20:12:31.000000000","message":"This is handling 2 cases in the same way,\n1) when \u0027initiator_target_map\u0027 key doesn\u0027t exist in connection_properties (dict)\n2) when the key exists but the value of \u0027initiator_target_map\u0027 is None\n\nit seems right for current scenario but isn\u0027t it a little ambiguous for future updates here ?","commit_id":"53877a95bc9f4d40315f876c076a7a32817ea904"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"d93e85d293a23b997f3b066b3da6efe9b7dbf8ae","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            wwpn_lun_map[wwpn] \u003d lun"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        # If there is an initiator_target_map we can update it too"},{"line_number":119,"context_line":"        if connection_properties.get(\u0027initiator_target_map\u0027) is not None:"},{"line_number":120,"context_line":"            itmap \u003d connection_properties[\u0027initiator_target_map\u0027]"},{"line_number":121,"context_line":"            new_itmap \u003d dict()"},{"line_number":122,"context_line":"            for init_wwpn in itmap:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_96224ea2","line":119,"range":{"start_line":119,"start_character":11,"end_line":119,"end_character":72},"in_reply_to":"9fdfeff1_3cc3463a","updated":"2019-02-15 18:15:24.000000000","message":"I\u0027m not concerned about the handling rather readability.\nI was just making sure we weren\u0027t compromising with the readability for optimization.","commit_id":"53877a95bc9f4d40315f876c076a7a32817ea904"},{"author":{"_account_id":22560,"name":"Minho Ban","email":"mhban@samsung.com","username":"mhban"},"change_message_id":"60a12f8300df8d1414a8add6c41594691dd377d3","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            wwpn_lun_map[wwpn] \u003d lun"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        # If there is an initiator_target_map we can update it too"},{"line_number":119,"context_line":"        if connection_properties.get(\u0027initiator_target_map\u0027) is not None:"},{"line_number":120,"context_line":"            itmap \u003d connection_properties[\u0027initiator_target_map\u0027]"},{"line_number":121,"context_line":"            new_itmap \u003d dict()"},{"line_number":122,"context_line":"            for init_wwpn in itmap:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_af1abe79","line":119,"range":{"start_line":119,"start_character":11,"end_line":119,"end_character":72},"in_reply_to":"9fdfeff1_da788c90","updated":"2019-02-14 06:46:23.000000000","message":"Any alternatives can you suggest?","commit_id":"53877a95bc9f4d40315f876c076a7a32817ea904"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"4acf9c6bed70711e10249f3e945c12f127b83211","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            wwpn_lun_map[wwpn] \u003d lun"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        # If there is an initiator_target_map we can update it too"},{"line_number":119,"context_line":"        if connection_properties.get(\u0027initiator_target_map\u0027) is not None:"},{"line_number":120,"context_line":"            itmap \u003d connection_properties[\u0027initiator_target_map\u0027]"},{"line_number":121,"context_line":"            new_itmap \u003d dict()"},{"line_number":122,"context_line":"            for init_wwpn in itmap:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_3cc3463a","line":119,"range":{"start_line":119,"start_character":11,"end_line":119,"end_character":72},"in_reply_to":"9fdfeff1_da788c90","updated":"2019-02-15 15:58:12.000000000","message":"That seems fine. Is there any reason we need to treat those two cases any differently? In both cases, we will not be able to execute this block that tries to get the data out of the target map.","commit_id":"53877a95bc9f4d40315f876c076a7a32817ea904"}],"os_brick/initiator/linuxfc.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"d95d882f2d2e03614ed63b636acb15a796f3fee5","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        # present for this hba or default to target_wwns if not present."},{"line_number":49,"context_line":"        wwpns \u003d conn_props[\u0027target_wwn\u0027]"},{"line_number":50,"context_line":"        if (\u0027initiator_target_map\u0027 in conn_props and"},{"line_number":51,"context_line":"                conn_props[\u0027initiator_target_map\u0027] is not None):"},{"line_number":52,"context_line":"            wwpns \u003d conn_props[\u0027initiator_target_map\u0027].get(hba[\u0027port_name\u0027],"},{"line_number":53,"context_line":"                                                           wwpns)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_bb17aa51","line":51,"updated":"2018-02-08 19:24:57.000000000","message":"Can just do\n    if conn_props.get(\u0027initiator_target_map\u0027) is not None:\n\ninstead","commit_id":"e755058146b864f52b1ce86fc82d61345e05e97a"},{"author":{"_account_id":14624,"name":"Sam Wan","email":"sam.wan@emc.com","username":"samwan"},"change_message_id":"75000d7873fe32bd54a9973f46615df4b1bda9d1","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        # present for this hba or default to target_wwns if not present."},{"line_number":49,"context_line":"        wwpns \u003d conn_props[\u0027target_wwn\u0027]"},{"line_number":50,"context_line":"        if (\u0027initiator_target_map\u0027 in conn_props and"},{"line_number":51,"context_line":"                conn_props[\u0027initiator_target_map\u0027] is not None):"},{"line_number":52,"context_line":"            wwpns \u003d conn_props[\u0027initiator_target_map\u0027].get(hba[\u0027port_name\u0027],"},{"line_number":53,"context_line":"                                                           wwpns)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_219044ed","line":51,"in_reply_to":"3fa0c359_bb17aa51","updated":"2018-02-09 02:13:27.000000000","message":"Hi Eric,\nThanks for the suggestion and it\u0027s more concise.","commit_id":"e755058146b864f52b1ce86fc82d61345e05e97a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"3ff44fb1529775ef6bc533a0c1026a04cf839131","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        # We want the target\u0027s WWPNs, so we use the initiator_target_map if"},{"line_number":48,"context_line":"        # present for this hba or default to target_wwns if not present."},{"line_number":49,"context_line":"        wwpns \u003d conn_props[\u0027target_wwn\u0027]"},{"line_number":50,"context_line":"        if conn_props.get(\u0027initiator_target_map\u0027) is not None:"},{"line_number":51,"context_line":"            wwpns \u003d conn_props[\u0027initiator_target_map\u0027].get(hba[\u0027port_name\u0027],"},{"line_number":52,"context_line":"                                                           wwpns)"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_885f6d71","line":50,"updated":"2018-02-15 09:21:14.000000000","message":"-1: This doesn\u0027t cover if the map is an empty dict.\n\n if conn_props.get(\u0027initiator_target_map\u0027):","commit_id":"bf688c0a6d22040a02c994bd8e1c582bf9da0a16"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"a527da1defe024a9c97464ba46734a1fb355e4e5","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        # We want the target\u0027s WWPNs, so we use the initiator_target_map if"},{"line_number":48,"context_line":"        # present for this hba or default to target_wwns if not present."},{"line_number":49,"context_line":"        wwpns \u003d conn_props[\u0027target_wwn\u0027]"},{"line_number":50,"context_line":"        if conn_props.get(\u0027initiator_target_map\u0027) is not None:"},{"line_number":51,"context_line":"            wwpns \u003d conn_props[\u0027initiator_target_map\u0027].get(hba[\u0027port_name\u0027],"},{"line_number":52,"context_line":"                                                           wwpns)"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_214ad67f","line":50,"in_reply_to":"3fa0c359_6331d8ec","updated":"2018-02-16 11:51:42.000000000","message":"But even if the code has the same result it makes it harder to follow the logic and is less pythonic. With my suggestion  it is clearer that we don\u0027t try to get information from the initiator_target_map if there is no information.\n\nSo L51 would only cover when we have information but not the information we want.","commit_id":"bf688c0a6d22040a02c994bd8e1c582bf9da0a16"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"7d79c2dfa47a3f3d1deae82498d94f66445703b7","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        # We want the target\u0027s WWPNs, so we use the initiator_target_map if"},{"line_number":48,"context_line":"        # present for this hba or default to target_wwns if not present."},{"line_number":49,"context_line":"        wwpns \u003d conn_props[\u0027target_wwn\u0027]"},{"line_number":50,"context_line":"        if conn_props.get(\u0027initiator_target_map\u0027) is not None:"},{"line_number":51,"context_line":"            wwpns \u003d conn_props[\u0027initiator_target_map\u0027].get(hba[\u0027port_name\u0027],"},{"line_number":52,"context_line":"                                                           wwpns)"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_6331d8ec","line":50,"in_reply_to":"3fa0c359_885f6d71","updated":"2018-02-15 14:51:55.000000000","message":"It doesn\u0027t need to. The only concern is if it is None. If it is empty then the get() below will return the default value.","commit_id":"bf688c0a6d22040a02c994bd8e1c582bf9da0a16"}]}
