)]}'
{"nova/virt/configdrive.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cb91f6990bd37c490dd85f1a2d43ef069db50e43","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        dirname \u003d os.path.dirname(filepath)"},{"line_number":88,"context_line":"        fileutils.ensure_tree(dirname)"},{"line_number":89,"context_line":"        with open(filepath, \u0027wb\u0027) as f:"},{"line_number":90,"context_line":"            f.write(data.encode(\u0027utf-8\u0027))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def add_instance_metadata(self, instance_md):"},{"line_number":93,"context_line":"        for (path, data) in instance_md.metadata_for_config_drive():"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_eeeaf073","line":90,"updated":"2015-10-04 13:34:55.000000000","message":"This won\u0027t work. You can only write str to a file, not bytes.","commit_id":"414243ace138242726b253ca080be0feb70cacc0"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"e76913bae9d934a529b744090136f2ad303f8fd9","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        dirname \u003d os.path.dirname(filepath)"},{"line_number":88,"context_line":"        fileutils.ensure_tree(dirname)"},{"line_number":89,"context_line":"        with open(filepath, \u0027wb\u0027) as f:"},{"line_number":90,"context_line":"            f.write(data.encode(\u0027utf-8\u0027))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def add_instance_metadata(self, instance_md):"},{"line_number":93,"context_line":"        for (path, data) in instance_md.metadata_for_config_drive():"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_c4912a54","line":90,"in_reply_to":"7a2fa921_25db781d","updated":"2015-10-06 19:07:42.000000000","message":"Done","commit_id":"414243ace138242726b253ca080be0feb70cacc0"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"09953a874f94b5885de7fd023a20eaaa577bfa67","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        dirname \u003d os.path.dirname(filepath)"},{"line_number":88,"context_line":"        fileutils.ensure_tree(dirname)"},{"line_number":89,"context_line":"        with open(filepath, \u0027wb\u0027) as f:"},{"line_number":90,"context_line":"            f.write(data.encode(\u0027utf-8\u0027))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def add_instance_metadata(self, instance_md):"},{"line_number":93,"context_line":"        for (path, data) in instance_md.metadata_for_config_drive():"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_25db781d","line":90,"in_reply_to":"9a1a9d01_358fcccd","updated":"2015-10-05 15:42:26.000000000","message":"Alessandro is correct:\n\n    \u003e\u003e\u003e with open(\u0027testfile\u0027, \u0027wb\u0027) as f:\n    ...     f.write(\u0027this is a test\u0027.encode(\u0027utf-8\u0027))\n    ... \n    14\n    \u003e\u003e\u003e with open(\u0027testfile\u0027, \u0027wb\u0027) as f:\n    ...     f.write(\u0027this is a test\u0027)\n    ... \n    Traceback (most recent call last):\n      File \"\u003cstdin\u003e\", line 2, in \u003cmodule\u003e\n    TypeError: \u0027str\u0027 does not support the buffer interface\n\n(Above using the Python 3 interpreter.)","commit_id":"414243ace138242726b253ca080be0feb70cacc0"},{"author":{"_account_id":3185,"name":"Alessandro Pilotti","email":"apilotti@cloudbasesolutions.com","username":"alexpilotti"},"change_message_id":"db6665e791576ee4cf8ebedb3ccaaa60bf5ef6b3","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        dirname \u003d os.path.dirname(filepath)"},{"line_number":88,"context_line":"        fileutils.ensure_tree(dirname)"},{"line_number":89,"context_line":"        with open(filepath, \u0027wb\u0027) as f:"},{"line_number":90,"context_line":"            f.write(data.encode(\u0027utf-8\u0027))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def add_instance_metadata(self, instance_md):"},{"line_number":93,"context_line":"        for (path, data) in instance_md.metadata_for_config_drive():"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_358fcccd","line":90,"in_reply_to":"9a1a9d01_eeeaf073","updated":"2015-10-05 08:36:26.000000000","message":"it\u0027s the other way around. :-)\n\nIn Python 3 you can only write bytes to a file, not str.\nIn Python 2 str and bytes are the same","commit_id":"414243ace138242726b253ca080be0feb70cacc0"}]}
