mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 02:50:12 +01:00
Merge branch 'master' into 'master'
Scanner: handle utf8 errors more gracefully Don't throw an error without any info which file caused it. Fixes #226 See merge request !180
This commit is contained in:
commit
7d0bd345d1
@ -199,7 +199,7 @@ def scan_source(build_dir, root_dir, build):
|
||||
elif ext == 'java':
|
||||
if not os.path.isfile(fp):
|
||||
continue
|
||||
with open(fp, 'r', encoding='utf8') as f:
|
||||
with open(fp, 'r', encoding='utf8', errors='replace') as f:
|
||||
for line in f:
|
||||
if 'DexClassLoader' in line:
|
||||
count += handleproblem('DexClassLoader', fd, fp)
|
||||
@ -208,7 +208,7 @@ def scan_source(build_dir, root_dir, build):
|
||||
elif ext == 'gradle':
|
||||
if not os.path.isfile(fp):
|
||||
continue
|
||||
with open(fp, 'r', encoding='utf8') as f:
|
||||
with open(fp, 'r', encoding='utf8', errors='replace') as f:
|
||||
lines = f.readlines()
|
||||
for i, line in enumerate(lines):
|
||||
if is_used_by_gradle(line):
|
||||
|
Loading…
Reference in New Issue
Block a user