def embed_cbi_metadata(self): ''' Embeds the cbi_metadata ''' cbi_string = ComicBookInfo().stringFromMetadata(self.comic_metadata) # ensure we have a temp file self.make_temp_cbz_file() # save the metadata in the comment zf = ZipFile(self.file, 'a') zf.comment = cbi_string.encode("utf-8") zf._didModify = True zf.close()