From: Petr Štetiar Date: Sat, 26 Mar 2022 09:18:10 +0000 (+0100) Subject: phase2: fix just another byte/string inconsistencies X-Git-Tag: v1~4 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=85ffd9a27da104698b3ee433aaf0ffb0cb13504e;p=buildbot.git phase2: fix just another byte/string inconsistencies 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 --- diff --git a/phase2/master.cfg b/phase2/master.cfg index eb9c37f..8b7df6a 100644 --- a/phase2/master.cfg +++ b/phase2/master.cfg @@ -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)