)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"08f24155711455b0b3aba3e85f1b4805daa8bcc9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     LIU Yulong \u003ci@liuyulong.me\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-03-29 00:26:48 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Covert int to bytes for py3"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The following error raised during the functional test:"},{"line_number":10,"context_line":"\"TypeError: unsupported operand type(s) for %: \u0027bytes\u0027 and \u0027int\u0027\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_6c802ac0","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":6},"updated":"2019-03-28 16:50:42.000000000","message":"convert","commit_id":"ffb9c6dd415249c98f354eb3b007542d38357f20"}],"neutron/agent/linux/daemon.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e2ae3fadccbf539527b3964508f8813c216310e5","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def write(self, pid):"},{"line_number":138,"context_line":"        os.ftruncate(self.fd, 0)"},{"line_number":139,"context_line":"        os.write(self.fd, bytes(\"%s\" % pid, \u0027UTF-8\u0027))"},{"line_number":140,"context_line":"        os.fsync(self.fd)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def read(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_8c3b16e8","line":139,"updated":"2019-03-28 16:48:13.000000000","message":"This is a problem in Python3, not the daemon code itself [1]\n\nThis code fails in Python2:\n\u003e\u003e\u003e bytes(\u00271233\u0027, \u0027UTF-8\u0027)\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nTypeError: str() takes at most 1 argument (2 given)\n\nYou should use six:\nsix.b(\"%s\" % pid)\n\n[1] https://github.com/google/rekall/issues/317","commit_id":"ffb9c6dd415249c98f354eb3b007542d38357f20"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"08f24155711455b0b3aba3e85f1b4805daa8bcc9","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def write(self, pid):"},{"line_number":138,"context_line":"        os.ftruncate(self.fd, 0)"},{"line_number":139,"context_line":"        os.write(self.fd, bytes(\"%s\" % pid, \u0027UTF-8\u0027))"},{"line_number":140,"context_line":"        os.fsync(self.fd)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def read(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_8c9f9600","line":139,"range":{"start_line":139,"start_character":26,"end_line":139,"end_character":52},"updated":"2019-03-28 16:50:42.000000000","message":"py2 will be broke with this I guess ?\n\nif not sys.version_info[0] \u003c 3: would help","commit_id":"ffb9c6dd415249c98f354eb3b007542d38357f20"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"51ed15e674f8b75639fd24bc6a87cc996425db68","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def write(self, pid):"},{"line_number":138,"context_line":"        os.ftruncate(self.fd, 0)"},{"line_number":139,"context_line":"        os.write(self.fd, bytes(\"%s\" % pid, \u0027UTF-8\u0027))"},{"line_number":140,"context_line":"        os.fsync(self.fd)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def read(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_fc77e3d2","line":139,"range":{"start_line":139,"start_character":26,"end_line":139,"end_character":52},"in_reply_to":"5fc1f717_8c9f9600","updated":"2019-03-29 00:46:22.000000000","message":"six will be the right approach.\n\nBTW, py2 may be deprecated someday, or sooner.","commit_id":"ffb9c6dd415249c98f354eb3b007542d38357f20"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d4e1061e964a1a36141b5a7a6a85b7935d2c4765","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def write(self, pid):"},{"line_number":138,"context_line":"        os.ftruncate(self.fd, 0)"},{"line_number":139,"context_line":"        os.write(self.fd, b\"%d\" % pid)"},{"line_number":140,"context_line":"        os.fsync(self.fd)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def read(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_06f5b9ca","side":"PARENT","line":139,"updated":"2019-03-29 04:33:16.000000000","message":"I am a bit confused. This code works with python3.6.\n\nhttp://paste.openstack.org/show/748561/\n\nAm I missing something?","commit_id":"d03bf63eaaa5b235e9bd50401419fe084bed1500"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e507deded5a54ff0ab4cca2068df03157c1ad680","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def write(self, pid):"},{"line_number":138,"context_line":"        os.ftruncate(self.fd, 0)"},{"line_number":139,"context_line":"        os.write(self.fd, b\"%d\" % pid)"},{"line_number":140,"context_line":"        os.fsync(self.fd)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def read(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_692fae3e","side":"PARENT","line":139,"in_reply_to":"5fc1f717_06f5b9ca","updated":"2019-03-29 06:37:43.000000000","message":"Python 3.4 does not work.","commit_id":"d03bf63eaaa5b235e9bd50401419fe084bed1500"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"247980bc2e544852accfd8c224683bba9458e4a0","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def write(self, pid):"},{"line_number":138,"context_line":"        os.ftruncate(self.fd, 0)"},{"line_number":139,"context_line":"        os.write(self.fd, b\"%d\" % pid)"},{"line_number":140,"context_line":"        os.fsync(self.fd)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def read(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_2959a68c","side":"PARENT","line":139,"in_reply_to":"5fc1f717_692fae3e","updated":"2019-03-29 07:12:37.000000000","message":"Thanks.\n\nI am afraid we do not test neutron with python 3.4 at all...\n\nAlthough it works in my local python36 test, this looks like anti pattern in python3 after reading several documents. The proposed approach sounds fine.","commit_id":"d03bf63eaaa5b235e9bd50401419fe084bed1500"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d4e1061e964a1a36141b5a7a6a85b7935d2c4765","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"import pwd"},{"line_number":22,"context_line":"import signal"},{"line_number":23,"context_line":"import six"},{"line_number":24,"context_line":"import sys"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from neutron_lib import exceptions"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_a65145db","line":23,"updated":"2019-03-29 04:33:16.000000000","message":"six is third-party library, so it should be placed around neutron_lib/oslo_log below.","commit_id":"d617a93590499d8b515d7e7d83aa25557393929f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e507deded5a54ff0ab4cca2068df03157c1ad680","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"import pwd"},{"line_number":22,"context_line":"import signal"},{"line_number":23,"context_line":"import six"},{"line_number":24,"context_line":"import sys"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from neutron_lib import exceptions"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_e922be51","line":23,"in_reply_to":"5fc1f717_a65145db","updated":"2019-03-29 06:37:43.000000000","message":"Done","commit_id":"d617a93590499d8b515d7e7d83aa25557393929f"}]}
