[buildbot] phase2: fix just another byte/string inconsistencies

LEDE Commits lede-commits at lists.infradead.org
Sat Mar 26 02:21:18 PDT 2022


ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/85ffd9a27da104698b3ee433aaf0ffb0cb13504e

commit 85ffd9a27da104698b3ee433aaf0ffb0cb13504e
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Sat Mar 26 10:18:10 2022 +0100

    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 <ynezz at true.cz>
---
 phase2/master.cfg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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)
 




More information about the lede-commits mailing list