File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -109,10 +109,10 @@ def git_ls_tree():
109
109
return dirs , files , commits
110
110
111
111
112
- def git_open (filename ):
112
+ def git_open (filename , decode_errors = 'strict' ):
113
113
cmd = ['git' , 'cat-file' , 'blob' , f'{ GIT_BRANCH } :{ filename } ' ]
114
114
with Popen (cmd , stdout = PIPE ) as p :
115
- return StringIO (readutf8 ( p .stdout ))
115
+ return StringIO (p .stdout . read (). decode ( 'utf-8' , errors = decode_errors ))
116
116
117
117
118
118
def git_listdir (path ):
@@ -384,7 +384,8 @@ class RepoTreeTest(TestCase):
384
384
# PKGBUILD may be added later by lilac
385
385
continue
386
386
pkgbuild_path = os .path .join (pkgpath (package ), 'PKGBUILD' )
387
- with git_open (pkgbuild_path ) as pkgbuild_file :
387
+ print ('checking' , pkgbuild_path )
388
+ with git_open (pkgbuild_path , decode_errors = 'replace' ) as pkgbuild_file :
388
389
pkgbuild = pkgbuild_file .read ()
389
390
if not (('replaces' in pkgbuild ) or ('groups' in pkgbuild )):
390
391
# only parse pkgbuild as srcinfo when necessory
You can’t perform that action at this time.
0 commit comments