commit:     060df92357aed97af955aa36caf47e8518b01e05
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 18 20:25:38 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Apr 18 20:26:38 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=060df923

catalyst: Open CONTENTS file in text mode

Fixes: bb21b8615e64 (catalyst: gzip the .CONTENTS file)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/genbase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index 3db20f84..c7dd87bc 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -29,7 +29,7 @@ class GenBase():
     def gen_contents_file(self, path):
         c = self.settings['contents_map']
 
-        with gzip.open(path + '.CONTENTS.gz', 'w', encoding='utf-8') as file:
+        with gzip.open(path + '.CONTENTS.gz', 'wt', encoding='utf-8') as file:
             file.write(c.contents(path, '', verbose=self.settings['VERBOSE']))
 
     def gen_digest_file(self, path):

Reply via email to