)]}'
{"glance_store/_drivers/swift/store.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"d2935da9fe497cdc4cfe6114693793cd7b161797","unresolved":false,"context_lines":[{"line_number":544,"context_line":"                        content_length \u003d chunk_size"},{"line_number":545,"context_line":""},{"line_number":546,"context_line":"                    chunk_name \u003d \"%s-%05d\" % (location.obj, chunk_id)"},{"line_number":547,"context_line":"                    byteone \u003d image_file.read(1)"},{"line_number":548,"context_line":"                    if len(byteone) \u003d\u003d 0:"},{"line_number":549,"context_line":"                        LOG.debug(\u0027Not writing zero-length chunk\u0027)"},{"line_number":550,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_73ac078c","line":547,"updated":"2016-01-25 19:15:40.000000000","message":"Nice trick!\n\nWhat if we move this logic (reading the first byte) into `ChunkReader` and let it raise the exception from the constructor if the chukn is empty?\n\nWe can also have an `is_empty` method there to check this. Just want to avoid adding another keyword to `ChunkReader` and splitting the logic.","commit_id":"6c52b84bc9ffcd770213b1458d7898079736f66a"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"d369aac423abd998e252cf59334f247a96f066fb","unresolved":false,"context_lines":[{"line_number":544,"context_line":"                        content_length \u003d chunk_size"},{"line_number":545,"context_line":""},{"line_number":546,"context_line":"                    chunk_name \u003d \"%s-%05d\" % (location.obj, chunk_id)"},{"line_number":547,"context_line":"                    byteone \u003d image_file.read(1)"},{"line_number":548,"context_line":"                    if len(byteone) \u003d\u003d 0:"},{"line_number":549,"context_line":"                        LOG.debug(\u0027Not writing zero-length chunk\u0027)"},{"line_number":550,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_0678cf8e","line":547,"in_reply_to":"9a68dd71_73ac078c","updated":"2016-01-26 10:25:41.000000000","message":"I think having an \u0027is_empty\u0027 method makes a lot of sense - thanks.","commit_id":"6c52b84bc9ffcd770213b1458d7898079736f66a"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"b6f70a046e4dbe61602e2256e88e132dcb1a79f8","unresolved":false,"context_lines":[{"line_number":546,"context_line":"                    chunk_name \u003d \"%s-%05d\" % (location.obj, chunk_id)"},{"line_number":547,"context_line":"                    reader \u003d ChunkReader(image_file, checksum, chunk_size,"},{"line_number":548,"context_line":"                                         verifier)"},{"line_number":549,"context_line":"                    if reader.is_zero_size is True:"},{"line_number":550,"context_line":"                        LOG.debug(\u0027Not writing zero-length chunk.\u0027)"},{"line_number":551,"context_line":"                        break"},{"line_number":552,"context_line":"                    try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_2acec983","line":549,"updated":"2016-01-27 01:57:35.000000000","message":"nit:\n\n    if reader.is_zero_size:\n        ...","commit_id":"16f1b7064df27c251585b897f5a88f7d73ebea74"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"b6f70a046e4dbe61602e2256e88e132dcb1a79f8","unresolved":false,"context_lines":[{"line_number":954,"context_line":"        self.bytes_read \u003d 0"},{"line_number":955,"context_line":"        self.is_zero_size \u003d False"},{"line_number":956,"context_line":"        self.byteone \u003d fd.read(1)"},{"line_number":957,"context_line":"        if len(self.byteone) \u003d\u003d 0:"},{"line_number":958,"context_line":"            self.is_zero_size \u003d True"},{"line_number":959,"context_line":""},{"line_number":960,"context_line":"    def do_read(self, i):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_aab959ee","line":957,"updated":"2016-01-27 01:57:35.000000000","message":"nit: This could be:\n\n    self.is_zero_size \u003d len(self.byteone) \u003d\u003d 0","commit_id":"16f1b7064df27c251585b897f5a88f7d73ebea74"}]}
