)]}'
{"ironic/tests/db/sqlalchemy/test_migrations.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"d7f5fb16fdb8433214c197157035d883c3cc170e","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    def execute_cmd(self, cmd\u003dNone):"},{"line_number":170,"context_line":"        proc \u003d subprocess.Popen(cmd, stdout\u003dsubprocess.PIPE,"},{"line_number":171,"context_line":"                                stderr\u003dsubprocess.STDOUT, shell\u003dTrue)"},{"line_number":172,"context_line":"        output \u003d proc.communicate()[0]"},{"line_number":173,"context_line":"        LOG.debug(output)"},{"line_number":174,"context_line":"        self.assertEqual(0, proc.returncode,"},{"line_number":175,"context_line":"                         \"Failed to run: %s\\n%s\" % (cmd, output))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FYHE%3D","line":172,"updated":"2013-11-07 21:42:21.000000000","message":"using subprocess.check_output would be a lot simpler. Note that the change you have here loses stderr.. but sadly when I check the check_output internals so does it.\n\nI note other issues here, and since I have to give you a -1 on the stderr thing we may as well fix them all at once. In future we should move to attaching the output as a detail object, but I see a few things I should fix in that API first, so...:\n\n def execute_cmd(self, cmd):\n     proc \u003d subprocess.Popen(\n         cmd, stdout\u003dsubprocess.PIPE, stderr\u003dsubprocess.STDOUT, shell\u003dTrue)\n     out, err \u003d proc.communicate()\n     LOG.debug(out)\n     LOG.debug(err)\n     self.assertEqual(0, proc.returncode,\n         \"Failed to run: %s\\n%r\\n%r\" % (cmd, out, err))","commit_id":"23f5478825d8248c58018631014b28c1addcce76"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"2974ec84a22a4622624e48705b09656b2225c419","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    def execute_cmd(self, cmd\u003dNone):"},{"line_number":170,"context_line":"        proc \u003d subprocess.Popen(cmd, stdout\u003dsubprocess.PIPE,"},{"line_number":171,"context_line":"                                stderr\u003dsubprocess.STDOUT, shell\u003dTrue)"},{"line_number":172,"context_line":"        output \u003d proc.communicate()[0]"},{"line_number":173,"context_line":"        LOG.debug(output)"},{"line_number":174,"context_line":"        self.assertEqual(0, proc.returncode,"},{"line_number":175,"context_line":"                         \"Failed to run: %s\\n%s\" % (cmd, output))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FXLQ%3D","line":172,"in_reply_to":"AAAATn%2F%2FXus%3D","updated":"2013-11-08 06:58:46.000000000","message":"Ah nuts, I missed that. Thank you. Do you feel like fixing the cmd\u003dNone thing though? Feel free to do that as a subsequent patch.","commit_id":"23f5478825d8248c58018631014b28c1addcce76"},{"author":{"_account_id":6722,"name":"ChangBo Guo(gcb)","email":"guochbo@cn.ibm.com","username":"guochbo"},"change_message_id":"179068482d4987dbc3f8f93465b6cfd04eb01f59","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    def execute_cmd(self, cmd\u003dNone):"},{"line_number":170,"context_line":"        proc \u003d subprocess.Popen(cmd, stdout\u003dsubprocess.PIPE,"},{"line_number":171,"context_line":"                                stderr\u003dsubprocess.STDOUT, shell\u003dTrue)"},{"line_number":172,"context_line":"        output \u003d proc.communicate()[0]"},{"line_number":173,"context_line":"        LOG.debug(output)"},{"line_number":174,"context_line":"        self.assertEqual(0, proc.returncode,"},{"line_number":175,"context_line":"                         \"Failed to run: %s\\n%s\" % (cmd, output))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FXus%3D","line":172,"in_reply_to":"AAAATn%2F%2FYHE%3D","updated":"2013-11-08 02:38:34.000000000","message":"Hi,\nI merge the sterr into stdout,  see  parameter stderr\u003dsubprocess.STDOUT(not\nstderr\u003dsubprocess.PIPE) ,  :p\nThat means the change dose  same behavior with  commands.getstatusoutput(cmd)[1]\n\nAnd I had tested  current change  and  original logic, they have same behavior.","commit_id":"23f5478825d8248c58018631014b28c1addcce76"}]}
