phase2: fix just another byte/string inconsistencies
authorPetr Štetiar <ynezz@true.cz>
Sat, 26 Mar 2022 09:18:10 +0000 (10:18 +0100)
committerPetr Štetiar <ynezz@true.cz>
Sat, 26 Mar 2022 09:18:10 +0000 (10:18 +0100)
 File "/phase2/master.cfg", line 203, in parse_feed_entry
   if parts[0].startswith("src-git"):
 builtins.TypeError: startswith first arg must be bytes or a tuple of bytes, not str

Fixes: f3fcdbec877e ("phase2: fix obsolete assumption about feed methods")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
phase2/master.cfg

index eb9c37fc5d73b294c650dfa356d87fef3cd4c48f..8b7df6a8697344966ec8f0e5aeb25f1b1bea8165 100644 (file)
@@ -212,9 +212,9 @@ make = subprocess.Popen(['make', '--no-print-directory', '-C', work_dir+'/source
 
 line = make.stdout.readline()
 if line:
-       parse_feed_entry(line)
+       parse_feed_entry(str(line, 'utf-8'))
 
-with open(work_dir+'/source.git/feeds.conf.default', 'r') as f:
+with open(work_dir+'/source.git/feeds.conf.default', 'r', encoding='utf-8') as f:
        for line in f:
                parse_feed_entry(line)