)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"799f732982c5d4cffc9b7712df68756c2e9b0471","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kevin_Zheng \u003czhengzhenyu@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-04-11 15:36:48 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix HTTP 500 raised for getColsolelog for stopped instance"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Stopped instances with pty console will not contain"},{"line_number":10,"context_line":"`source_node` information, and in the current"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bff0334d_cf8ba6c0","line":7,"range":{"start_line":7,"start_character":24,"end_line":7,"end_character":37},"updated":"2017-04-11 16:31:57.000000000","message":"getConsoleLog","commit_id":"77fc37f35de5b3cedc9df50fd25ff924f3a096da"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"957eb643a83d5680006a0b45314a69ef7b409a5c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kevin_Zheng \u003czhengzhenyu@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-04-11 15:36:48 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix HTTP 500 raised for getColsolelog for stopped instance"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Stopped instances with pty console will not contain"},{"line_number":10,"context_line":"`source_node` information, and in the current"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bff0334d_a1974748","line":7,"range":{"start_line":7,"start_character":24,"end_line":7,"end_character":37},"in_reply_to":"bff0334d_cf8ba6c0","updated":"2017-04-12 03:22:57.000000000","message":"Done","commit_id":"77fc37f35de5b3cedc9df50fd25ff924f3a096da"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"799f732982c5d4cffc9b7712df68756c2e9b0471","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Stopped instances with pty console will not contain"},{"line_number":10,"context_line":"`source_node` information, and in the current"},{"line_number":11,"context_line":"implementation pty will be used unassigned latter,"},{"line_number":12,"context_line":"and raise HTTP 500 error."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-bug: #1680363"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bff0334d_4f4f9692","line":11,"range":{"start_line":11,"start_character":15,"end_line":11,"end_character":49},"updated":"2017-04-11 16:31:57.000000000","message":"the pty variable used later will result in an UnboundLocalError, which results in a 500 error out of the API.","commit_id":"77fc37f35de5b3cedc9df50fd25ff924f3a096da"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"957eb643a83d5680006a0b45314a69ef7b409a5c","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Stopped instances with pty console will not contain"},{"line_number":10,"context_line":"`source_node` information, and in the current"},{"line_number":11,"context_line":"implementation pty will be used unassigned latter,"},{"line_number":12,"context_line":"and raise HTTP 500 error."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-bug: #1680363"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bff0334d_c1ac8ba0","line":11,"range":{"start_line":11,"start_character":15,"end_line":11,"end_character":49},"in_reply_to":"bff0334d_4f4f9692","updated":"2017-04-12 03:22:57.000000000","message":"Done","commit_id":"77fc37f35de5b3cedc9df50fd25ff924f3a096da"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"e4319932c71d7032cbf0c6760a10d1b72b461150","unresolved":false,"context_lines":[{"line_number":11193,"context_line":"            self.assertEqual(b\u002767890\u0027, output)"},{"line_number":11194,"context_line":""},{"line_number":11195,"context_line":"    def test_get_console_output_pty_not_available(self):"},{"line_number":11196,"context_line":"        fake_libvirt_utils.files[\u0027pty\u0027] \u003d b\u002701234567890\u0027"},{"line_number":11197,"context_line":""},{"line_number":11198,"context_line":"        instance_ref \u003d self.test_instance"},{"line_number":11199,"context_line":"        instance_ref[\u0027image_ref\u0027] \u003d 123456"},{"line_number":11200,"context_line":"        instance \u003d objects.Instance(**instance_ref)"},{"line_number":11201,"context_line":"        fake_dom_xml \u003d \"\"\""},{"line_number":11202,"context_line":"            \u003cdomain type\u003d\u0027kvm\u0027\u003e"},{"line_number":11203,"context_line":"                \u003cdevices\u003e"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_e46b0b82","line":11200,"range":{"start_line":11196,"start_character":0,"end_line":11200,"end_character":51},"updated":"2017-04-12 12:44:47.000000000","message":"You can replace those lines with:\n\n    instance \u003d objects.Instance(**self.test_instance)","commit_id":"8b5365a2ede69e59673a48f7258b760391930c74"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"301f395a7be98339dd8e95d6d1511eec23fd3162","unresolved":false,"context_lines":[{"line_number":11193,"context_line":"            self.assertEqual(b\u002767890\u0027, output)"},{"line_number":11194,"context_line":""},{"line_number":11195,"context_line":"    def test_get_console_output_pty_not_available(self):"},{"line_number":11196,"context_line":"        fake_libvirt_utils.files[\u0027pty\u0027] \u003d b\u002701234567890\u0027"},{"line_number":11197,"context_line":""},{"line_number":11198,"context_line":"        instance_ref \u003d self.test_instance"},{"line_number":11199,"context_line":"        instance_ref[\u0027image_ref\u0027] \u003d 123456"},{"line_number":11200,"context_line":"        instance \u003d objects.Instance(**instance_ref)"},{"line_number":11201,"context_line":"        fake_dom_xml \u003d \"\"\""},{"line_number":11202,"context_line":"            \u003cdomain type\u003d\u0027kvm\u0027\u003e"},{"line_number":11203,"context_line":"                \u003cdevices\u003e"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ff52f3f_57a36750","line":11200,"range":{"start_line":11196,"start_character":0,"end_line":11200,"end_character":51},"in_reply_to":"bff0334d_e46b0b82","updated":"2017-04-13 09:50:41.000000000","message":"Done","commit_id":"8b5365a2ede69e59673a48f7258b760391930c74"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"799f732982c5d4cffc9b7712df68756c2e9b0471","unresolved":false,"context_lines":[{"line_number":2715,"context_line":"        timer \u003d loopingcall.FixedIntervalLoopingCall(_wait_for_boot)"},{"line_number":2716,"context_line":"        timer.start(interval\u003d0.5).wait()"},{"line_number":2717,"context_line":""},{"line_number":2718,"context_line":"    def _flush_libvirt_console(self, pty):"},{"line_number":2719,"context_line":"        out, err \u003d utils.execute(\u0027dd\u0027,"},{"line_number":2720,"context_line":"                                 \u0027if\u003d%s\u0027 % pty,"},{"line_number":2721,"context_line":"                                 \u0027iflag\u003dnonblock\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"bff0334d_8f58fe55","line":2718,"updated":"2017-04-11 16:31:57.000000000","message":"This is just going to fail too, correct? Because pty would be None.","commit_id":"77fc37f35de5b3cedc9df50fd25ff924f3a096da"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"abde5714a871bb0c00cfddbae5a9ff2ddcca0ae8","unresolved":false,"context_lines":[{"line_number":2715,"context_line":"        timer \u003d loopingcall.FixedIntervalLoopingCall(_wait_for_boot)"},{"line_number":2716,"context_line":"        timer.start(interval\u003d0.5).wait()"},{"line_number":2717,"context_line":""},{"line_number":2718,"context_line":"    def _flush_libvirt_console(self, pty):"},{"line_number":2719,"context_line":"        out, err \u003d utils.execute(\u0027dd\u0027,"},{"line_number":2720,"context_line":"                                 \u0027if\u003d%s\u0027 % pty,"},{"line_number":2721,"context_line":"                                 \u0027iflag\u003dnonblock\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"bff0334d_6f580b87","line":2718,"in_reply_to":"bff0334d_8f58fe55","updated":"2017-04-12 02:44:58.000000000","message":"Actually this returns \u0027\u0027 if pty is None","commit_id":"77fc37f35de5b3cedc9df50fd25ff924f3a096da"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"799f732982c5d4cffc9b7712df68756c2e9b0471","unresolved":false,"context_lines":[{"line_number":2783,"context_line":"            for pty_console in pty_consoles:"},{"line_number":2784,"context_line":"                source_node \u003d pty_console.find(\u0027./source\u0027)"},{"line_number":2785,"context_line":"                if source_node is None:"},{"line_number":2786,"context_line":"                    pty \u003d None"},{"line_number":2787,"context_line":"                    continue"},{"line_number":2788,"context_line":"                pty \u003d source_node.get(\"path\")"},{"line_number":2789,"context_line":"                if not pty:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bff0334d_4f1d5672","line":2786,"updated":"2017-04-11 16:31:57.000000000","message":"This is wrong, it\u0027s going to result in a different error later.\n\nYou should just do:\n\nfor pty_console in pty_consoles:\n   ...\nelse:\n   raise exception.ConsoleNotAvailable()\n\nThat\u0027s the cleanest way to handle this and will result in a 404 for the API which is expected.","commit_id":"77fc37f35de5b3cedc9df50fd25ff924f3a096da"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e60cb066f60490bf745b991701c5cf6afd1bcb4","unresolved":false,"context_lines":[{"line_number":2783,"context_line":"            for pty_console in pty_consoles:"},{"line_number":2784,"context_line":"                source_node \u003d pty_console.find(\u0027./source\u0027)"},{"line_number":2785,"context_line":"                if source_node is None:"},{"line_number":2786,"context_line":"                    pty \u003d None"},{"line_number":2787,"context_line":"                    continue"},{"line_number":2788,"context_line":"                pty \u003d source_node.get(\"path\")"},{"line_number":2789,"context_line":"                if not pty:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bff0334d_c1cdabb7","line":2786,"in_reply_to":"bff0334d_01539318","updated":"2017-04-12 03:02:24.000000000","message":"No, you\u0027d have something like this:\n\n       if pty_consoles:\n            for pty_console in pty_consoles:\n                source_node \u003d pty_console.find(\u0027./source\u0027)\n                if source_node is None:\n                    pty \u003d None\n                    continue\n                pty \u003d source_node.get(\"path\")\n                if not pty:\n                    continue\n                break\n            else:\n                # If we got here we didn\u0027t find a usable pty\n                raise exception.ConsoleNotAvailable()\n        else:\n            raise exception.ConsoleNotAvailable()","commit_id":"77fc37f35de5b3cedc9df50fd25ff924f3a096da"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"87a1607419bdada251603d3acd74fc6a62612dfc","unresolved":false,"context_lines":[{"line_number":2783,"context_line":"            for pty_console in pty_consoles:"},{"line_number":2784,"context_line":"                source_node \u003d pty_console.find(\u0027./source\u0027)"},{"line_number":2785,"context_line":"                if source_node is None:"},{"line_number":2786,"context_line":"                    pty \u003d None"},{"line_number":2787,"context_line":"                    continue"},{"line_number":2788,"context_line":"                pty \u003d source_node.get(\"path\")"},{"line_number":2789,"context_line":"                if not pty:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bff0334d_01539318","line":2786,"in_reply_to":"bff0334d_4f1d5672","updated":"2017-04-12 02:51:34.000000000","message":"hmm... you mean remove line 2782?","commit_id":"77fc37f35de5b3cedc9df50fd25ff924f3a096da"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"abde5714a871bb0c00cfddbae5a9ff2ddcca0ae8","unresolved":false,"context_lines":[{"line_number":2783,"context_line":"            for pty_console in pty_consoles:"},{"line_number":2784,"context_line":"                source_node \u003d pty_console.find(\u0027./source\u0027)"},{"line_number":2785,"context_line":"                if source_node is None:"},{"line_number":2786,"context_line":"                    pty \u003d None"},{"line_number":2787,"context_line":"                    continue"},{"line_number":2788,"context_line":"                pty \u003d source_node.get(\"path\")"},{"line_number":2789,"context_line":"                if not pty:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bff0334d_cf36f703","line":2786,"in_reply_to":"bff0334d_4f1d5672","updated":"2017-04-12 02:44:58.000000000","message":"yes, I also thought about this one, just trying the other one first.","commit_id":"77fc37f35de5b3cedc9df50fd25ff924f3a096da"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"e4319932c71d7032cbf0c6760a10d1b72b461150","unresolved":false,"context_lines":[{"line_number":2788,"context_line":"                if not pty:"},{"line_number":2789,"context_line":"                    continue"},{"line_number":2790,"context_line":"                break"},{"line_number":2791,"context_line":"            else:"},{"line_number":2792,"context_line":"                raise exception.ConsoleNotAvailable()"},{"line_number":2793,"context_line":"        else:"},{"line_number":2794,"context_line":"            raise exception.ConsoleNotAvailable()"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_d8a351b1","line":2791,"updated":"2017-04-12 12:44:47.000000000","message":"loops can have an \"else\", I\u0027m amazed and excited, honestly.","commit_id":"8b5365a2ede69e59673a48f7258b760391930c74"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5f47441287e9b3da0ccad15ea38f3b44bdfba13a","unresolved":false,"context_lines":[{"line_number":2788,"context_line":"                if not pty:"},{"line_number":2789,"context_line":"                    continue"},{"line_number":2790,"context_line":"                break"},{"line_number":2791,"context_line":"            else:"},{"line_number":2792,"context_line":"                raise exception.ConsoleNotAvailable()"},{"line_number":2793,"context_line":"        else:"},{"line_number":2794,"context_line":"            raise exception.ConsoleNotAvailable()"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ff52f3f_dd930c4f","line":2791,"range":{"start_line":2791,"start_character":12,"end_line":2791,"end_character":17},"updated":"2017-04-13 14:37:47.000000000","message":"Handily one of the most underutilized bits of syntax in Python. Neat","commit_id":"0c2b73e80141c6bef309097d1cbd0129d6ca094d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"47621ef412c95c6f91df349a383e1a6594bea977","unresolved":false,"context_lines":[{"line_number":2788,"context_line":"                if not pty:"},{"line_number":2789,"context_line":"                    continue"},{"line_number":2790,"context_line":"                break"},{"line_number":2791,"context_line":"            else:"},{"line_number":2792,"context_line":"                raise exception.ConsoleNotAvailable()"},{"line_number":2793,"context_line":"        else:"},{"line_number":2794,"context_line":"            raise exception.ConsoleNotAvailable()"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ff52f3f_bd5ba885","line":2791,"range":{"start_line":2791,"start_character":12,"end_line":2791,"end_character":17},"in_reply_to":"9ff52f3f_dd930c4f","updated":"2017-04-13 14:41:58.000000000","message":"Just something not really known like the try:except:else:finally, but really useful.","commit_id":"0c2b73e80141c6bef309097d1cbd0129d6ca094d"}]}
