)]}'
{"trove/guestagent/volume.py":[{"author":{"_account_id":9749,"name":"Greg Lucas","email":"greg@glucas.net","username":"glucas"},"change_message_id":"fa45c0ad56d00d9f0ee778f1eb72c96473ecdc9f","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        LOG.debug(\"Writing new line to fstab:%s\" % fstab_line)"},{"line_number":184,"context_line":"        with open(\u0027/etc/fstab\u0027, \"r\") as fstab:"},{"line_number":185,"context_line":"            fstab_content \u003d fstab.read()"},{"line_number":186,"context_line":"        with NamedTemporaryFile(delete\u003dFalse) as tempfstab:"},{"line_number":187,"context_line":"            tempfstab.write(fstab_content + fstab_line)"},{"line_number":188,"context_line":"        utils.execute(\"sudo\", \"install\", \"-o\", \"root\", \"-g\", \"root\", \"-m\","},{"line_number":189,"context_line":"                      \"644\", tempfstab.name, \"/etc/fstab\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_1159895c","line":186,"updated":"2014-08-05 19:45:48.000000000","message":"How about using delete\u003dTrue here, and indenting the subsequent utils.execute line into the \u0027with\u0027 block?\n\nSeems more pythonic. :-)","commit_id":"d5176723a5db62935323bc965964656a4ad2bec2"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"6c219e817f65cd84245b1827e2f8130f08c7589a","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        LOG.debug(\"Writing new line to fstab:%s\" % fstab_line)"},{"line_number":184,"context_line":"        with open(\u0027/etc/fstab\u0027, \"r\") as fstab:"},{"line_number":185,"context_line":"            fstab_content \u003d fstab.read()"},{"line_number":186,"context_line":"        with NamedTemporaryFile(delete\u003dFalse) as tempfstab:"},{"line_number":187,"context_line":"            tempfstab.write(fstab_content + fstab_line)"},{"line_number":188,"context_line":"        utils.execute(\"sudo\", \"install\", \"-o\", \"root\", \"-g\", \"root\", \"-m\","},{"line_number":189,"context_line":"                      \"644\", tempfstab.name, \"/etc/fstab\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_472a6392","line":186,"in_reply_to":"baada198_1159895c","updated":"2014-08-05 20:34:27.000000000","message":"+1 then you dont have to make a call to remove the file.","commit_id":"d5176723a5db62935323bc965964656a4ad2bec2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"c7ea175b669d93844b8b01d6f16eb24f75a94933","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        LOG.debug(\"Writing new line to fstab:%s\" % fstab_line)"},{"line_number":184,"context_line":"        with open(\u0027/etc/fstab\u0027, \"r\") as fstab:"},{"line_number":185,"context_line":"            fstab_content \u003d fstab.read()"},{"line_number":186,"context_line":"        with NamedTemporaryFile(delete\u003dFalse) as tempfstab:"},{"line_number":187,"context_line":"            tempfstab.write(fstab_content + fstab_line)"},{"line_number":188,"context_line":"        utils.execute(\"sudo\", \"install\", \"-o\", \"root\", \"-g\", \"root\", \"-m\","},{"line_number":189,"context_line":"                      \"644\", tempfstab.name, \"/etc/fstab\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_ca3cba95","line":186,"in_reply_to":"baada198_472a6392","updated":"2014-08-05 20:42:55.000000000","message":"Sorry, that\u0027s not a nice thing to do.\n\nif you set delete \u003d True, then the contract is that as soon as the file is closed, it will be deleted.\n\nWell, I\u0027ve got the file open, I\u0027ve written stuff to it. I\u0027m not about to run install as a sub-process to copy an open and potentially unflushed file into /etc/fstab.\n\nThis is cleaner. I think.","commit_id":"d5176723a5db62935323bc965964656a4ad2bec2"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"2f755be03b904c87efb7257ccc309d7c1fb184ee","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        LOG.debug(\"Writing new line to fstab:%s\" % fstab_line)"},{"line_number":184,"context_line":"        with open(\u0027/etc/fstab\u0027, \"r\") as fstab:"},{"line_number":185,"context_line":"            fstab_content \u003d fstab.read()"},{"line_number":186,"context_line":"        with NamedTemporaryFile(delete\u003dFalse) as tempfstab:"},{"line_number":187,"context_line":"            tempfstab.write(fstab_content + fstab_line)"},{"line_number":188,"context_line":"        utils.execute(\"sudo\", \"install\", \"-o\", \"root\", \"-g\", \"root\", \"-m\","},{"line_number":189,"context_line":"                      \"644\", tempfstab.name, \"/etc/fstab\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_0af312a1","line":186,"in_reply_to":"baada198_6a648eb3","updated":"2014-08-05 20:53:15.000000000","message":"ok i get it.","commit_id":"d5176723a5db62935323bc965964656a4ad2bec2"},{"author":{"_account_id":9749,"name":"Greg Lucas","email":"greg@glucas.net","username":"glucas"},"change_message_id":"5f7eec644d4a2fe58889a1a99534ee85df3d240f","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        LOG.debug(\"Writing new line to fstab:%s\" % fstab_line)"},{"line_number":184,"context_line":"        with open(\u0027/etc/fstab\u0027, \"r\") as fstab:"},{"line_number":185,"context_line":"            fstab_content \u003d fstab.read()"},{"line_number":186,"context_line":"        with NamedTemporaryFile(delete\u003dFalse) as tempfstab:"},{"line_number":187,"context_line":"            tempfstab.write(fstab_content + fstab_line)"},{"line_number":188,"context_line":"        utils.execute(\"sudo\", \"install\", \"-o\", \"root\", \"-g\", \"root\", \"-m\","},{"line_number":189,"context_line":"                      \"644\", tempfstab.name, \"/etc/fstab\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_6a648eb3","line":186,"in_reply_to":"baada198_ca3cba95","updated":"2014-08-05 20:45:05.000000000","message":"OK, makes sense.","commit_id":"d5176723a5db62935323bc965964656a4ad2bec2"}]}
