)]}'
{"neutron/services/trunk/rules.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"eedd03bf79a98033cab15da542b7b8db753948da","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        # We can reasonably expect segmentation details to be provided"},{"line_number":105,"context_line":"        # in all other cases for now."},{"line_number":106,"context_line":"        segmentation_id \u003d ("},{"line_number":107,"context_line":"            converters.convert_to_int(subport.get(\"segmentation_id\")))"},{"line_number":108,"context_line":"        segmentation_type \u003d subport.get(\"segmentation_type\")"},{"line_number":109,"context_line":"        if not segmentation_id or not segmentation_type:"},{"line_number":110,"context_line":"            msg \u003d _(\"Invalid subport details \u0027%s\u0027: missing segmentation \""}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_d8e0ab2b","line":107,"range":{"start_line":107,"start_character":23,"end_line":107,"end_character":37},"updated":"2016-07-21 12:30:43.000000000","message":"Now this already raises InvalidInput if segmentation_id is missing, which is also handled on L109 below. How about:\n\n try:\n    segmentation_id \u003d converters.convert_to_int(subport[\u0027segmentation_id\u0027])\n    segmentation_type \u003d subport[\u0027segmentation_type\u0027]\n except KeyError:\n    msg \u003d _(\u003cthe one from L110\u003e)\n    raise n_exc.InvalidInput(...)","commit_id":"5dd2734bc10ba2a8097f8d6e6006713d4dc87811"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1c61f78f0021189b49155ddbb0258afae34eb6b6","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        # We can reasonably expect segmentation details to be provided"},{"line_number":105,"context_line":"        # in all other cases for now."},{"line_number":106,"context_line":"        segmentation_id \u003d ("},{"line_number":107,"context_line":"            converters.convert_to_int(subport.get(\"segmentation_id\")))"},{"line_number":108,"context_line":"        segmentation_type \u003d subport.get(\"segmentation_type\")"},{"line_number":109,"context_line":"        if not segmentation_id or not segmentation_type:"},{"line_number":110,"context_line":"            msg \u003d _(\"Invalid subport details \u0027%s\u0027: missing segmentation \""}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_5d0bff7c","line":107,"range":{"start_line":107,"start_character":23,"end_line":107,"end_character":37},"in_reply_to":"dada55a8_d8e0ab2b","updated":"2016-07-21 15:41:14.000000000","message":"ok, let me revisit this.","commit_id":"5dd2734bc10ba2a8097f8d6e6006713d4dc87811"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"a314f39774c90fc00c010c462cc0226bf56bc107","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":115,"context_line":"        except n_exc.InvalidInput:"},{"line_number":116,"context_line":"            msg \u003d _(\"Invalid subport details: segmentation_id \u0027%s\u0027 is \""},{"line_number":117,"context_line":"                    \"not an valid integer\") % subport[\"segmentation_id\"]"},{"line_number":118,"context_line":"            raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        if segmentation_type not in self._segmentation_types:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_23342afa","line":117,"range":{"start_line":117,"start_character":25,"end_line":117,"end_character":27},"updated":"2016-07-21 16:23:57.000000000","message":"a","commit_id":"cb75e57a53a4c2590f572fefa76ca38791c61983"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a46d86deb186d87a901fe616a02b22b4f3476e29","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        # figure out defaults when the time comes to support Ironic."},{"line_number":104,"context_line":"        # We can reasonably expect segmentation details to be provided"},{"line_number":105,"context_line":"        # in all other cases for now."},{"line_number":106,"context_line":"        try:"},{"line_number":107,"context_line":"            segmentation_type \u003d subport[\"segmentation_type\"]"},{"line_number":108,"context_line":"            segmentation_id \u003d ("},{"line_number":109,"context_line":"                converters.convert_to_int(subport[\"segmentation_id\"]))"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_cfea71ac","line":106,"updated":"2016-07-22 07:45:11.000000000","message":"i prefer the old code - it was a little neater. you could have just added the validation for the ID there. But then again that is just my opinion.","commit_id":"5588f45a6dc6a4af70f24df94c1b1d0e737a24c4"}]}
