)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"change_message_id":"ccb80d132251804af4e79c686e0861d0fa100135","unresolved":false,"context_lines":[{"line_number":7,"context_line":"l2pop: get_agent_ports: Don\u0027t yield (None, {})"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There\u0027s no point to yield None lvm with empty entries."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I42aeb48a062d35038116978d70c8dac4139a5583"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"baada198_6c05ce13","line":10,"updated":"2014-08-11 22:57:04.000000000","message":"don\u0027t see the proper bug id assigned","commit_id":"4cec0ce2bb6b76d1770d60e5b12d9fba808c13f4"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6e26cfb4178ef50d750adc6d55c9e3ead86c8851","unresolved":false,"context_lines":[{"line_number":7,"context_line":"l2pop: get_agent_ports: Don\u0027t yield (None, {})"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There\u0027s no point to yield None lvm with empty entries."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I42aeb48a062d35038116978d70c8dac4139a5583"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"baada198_78c81221","line":10,"in_reply_to":"baada198_298816c2","updated":"2014-08-12 11:46:06.000000000","message":"Done","commit_id":"4cec0ce2bb6b76d1770d60e5b12d9fba808c13f4"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"32c4225b822c53acf6a66a33a7c225a3a9e40c2f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"l2pop: get_agent_ports: Don\u0027t yield (None, {})"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There\u0027s no point to yield None lvm with empty entries."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I42aeb48a062d35038116978d70c8dac4139a5583"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"baada198_9fa24295","line":10,"in_reply_to":"baada198_6c05ce13","updated":"2014-08-11 23:22:42.000000000","message":"this is not a bug.  this is a minor cleanup which makes the following changes easier.","commit_id":"4cec0ce2bb6b76d1770d60e5b12d9fba808c13f4"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"5475718ca4acd9d8e90b2cc6e8d78b8d7f656e38","unresolved":false,"context_lines":[{"line_number":7,"context_line":"l2pop: get_agent_ports: Don\u0027t yield (None, {})"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There\u0027s no point to yield None lvm with empty entries."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I42aeb48a062d35038116978d70c8dac4139a5583"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"baada198_298816c2","line":10,"in_reply_to":"baada198_9fa24295","updated":"2014-08-12 09:31:21.000000000","message":"I think we could call it a minor bug. Just a simple bug report should fix this problem. Or, if this patch is related to a blueprint, Partially-implements could be added and explaining why it is needed by that particular blueprint.","commit_id":"4cec0ce2bb6b76d1770d60e5b12d9fba808c13f4"}],"neutron/agent/l2population_rpc.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"27918ab6a23a2d3f9ec93a8aad607f64e60d96ff","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def get_agent_ports(self, fdb_entries, local_vlan_map):"},{"line_number":167,"context_line":"        for network_id, values in fdb_entries.items():"},{"line_number":168,"context_line":"            lvm \u003d local_vlan_map.get(network_id)"},{"line_number":169,"context_line":"            if lvm is None:"},{"line_number":170,"context_line":"                continue"},{"line_number":171,"context_line":"            agent_ports \u003d values.get(\u0027ports\u0027)"},{"line_number":172,"context_line":"            yield (lvm, agent_ports)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_048a3365","line":169,"updated":"2014-08-12 22:21:23.000000000","message":"if not lvm:\n\nLogically, what you have isn\u0027t precisely equivalent if bool(lvm) is False but lvm is not None.  The previous code would assign agent_ports to {} but this code proceeds to L171.  Since the previous code evaluates lvm in bool context it seems this code should too unless that was a bug that you\u0027re fixing.","commit_id":"fb5284d927ded1d7b06e11f128d424af741514d9"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"51bca97ef62e6fe256e795a19dc8439aa57b0be1","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def get_agent_ports(self, fdb_entries, local_vlan_map):"},{"line_number":167,"context_line":"        for network_id, values in fdb_entries.items():"},{"line_number":168,"context_line":"            lvm \u003d local_vlan_map.get(network_id)"},{"line_number":169,"context_line":"            if lvm is None:"},{"line_number":170,"context_line":"                continue"},{"line_number":171,"context_line":"            agent_ports \u003d values.get(\u0027ports\u0027)"},{"line_number":172,"context_line":"            yield (lvm, agent_ports)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_0af07dd9","line":169,"in_reply_to":"baada198_048a3365","updated":"2014-08-12 22:56:39.000000000","message":"unless None, bool(lvm) can\u0027t be False here.\nso no real differences.\n\nhaving said that, what we want to test here is if network_id has\nthe corresponding lvm.  in that sense lvm is None is more straightforward.\nwe are not interesting in the value of bool(lvm) here.","commit_id":"fb5284d927ded1d7b06e11f128d424af741514d9"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"80a7b53a30cd77b21ad9ab9b0509d14529e46430","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def get_agent_ports(self, fdb_entries, local_vlan_map):"},{"line_number":167,"context_line":"        for network_id, values in fdb_entries.items():"},{"line_number":168,"context_line":"            lvm \u003d local_vlan_map.get(network_id)"},{"line_number":169,"context_line":"            if lvm is None:"},{"line_number":170,"context_line":"                continue"},{"line_number":171,"context_line":"            agent_ports \u003d values.get(\u0027ports\u0027)"},{"line_number":172,"context_line":"            yield (lvm, agent_ports)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_605ad483","line":169,"updated":"2014-08-13 16:26:09.000000000","message":"With your change if lvm is None for every iteration of the loop, line 170 will be hit any time. No yield will be called and an exception will be thrown by the code using this function and trying to iterate the results.\nFor example:\n\n        for lvm, agent_ports in self.get_agent_ports(fdb_entries,\n                                                     self.local_vlan_map):\n\nwill throw en exception.\nNot sure what you are trying to fix here. This function should return something iterable in any case.","commit_id":"44463c6087c22c2006fcf7cf9c498ec4c5514a9a"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"4ff66c39a791d098a187aa1c7d00b8bf2451d7c9","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def get_agent_ports(self, fdb_entries, local_vlan_map):"},{"line_number":167,"context_line":"        for network_id, values in fdb_entries.items():"},{"line_number":168,"context_line":"            lvm \u003d local_vlan_map.get(network_id)"},{"line_number":169,"context_line":"            if lvm is None:"},{"line_number":170,"context_line":"                continue"},{"line_number":171,"context_line":"            agent_ports \u003d values.get(\u0027ports\u0027)"},{"line_number":172,"context_line":"            yield (lvm, agent_ports)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ac7a964_4d9c4f6a","line":169,"in_reply_to":"baada198_1b88a920","updated":"2014-08-14 08:19:52.000000000","message":"Sorry for the confusion. Even if the yield is not hit the function is a generator and will return an iterator.","commit_id":"44463c6087c22c2006fcf7cf9c498ec4c5514a9a"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2290aace0fcc5598b877885ace6029a32ceb3115","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def get_agent_ports(self, fdb_entries, local_vlan_map):"},{"line_number":167,"context_line":"        for network_id, values in fdb_entries.items():"},{"line_number":168,"context_line":"            lvm \u003d local_vlan_map.get(network_id)"},{"line_number":169,"context_line":"            if lvm is None:"},{"line_number":170,"context_line":"                continue"},{"line_number":171,"context_line":"            agent_ports \u003d values.get(\u0027ports\u0027)"},{"line_number":172,"context_line":"            yield (lvm, agent_ports)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_1b88a920","line":169,"in_reply_to":"baada198_605ad483","updated":"2014-08-13 16:39:06.000000000","message":"i don\u0027t understand your concern.\nwhat exception are you talking about?\ncan you explain?\n\nfor example, even the following generator is iteratable without problems.\n\ndef f():\n    if False:\n        yield 1","commit_id":"44463c6087c22c2006fcf7cf9c498ec4c5514a9a"}]}
