mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03: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
1 changed files with 2 additions and 2 deletions
|
|
@ -199,7 +199,7 @@ def scan_source(build_dir, root_dir, build):
|
||||||
elif ext == 'java':
|
elif ext == 'java':
|
||||||
if not os.path.isfile(fp):
|
if not os.path.isfile(fp):
|
||||||
continue
|
continue
|
||||||
with open(fp, 'r', encoding='utf8') as f:
|
with open(fp, 'r', encoding='utf8', errors='replace') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if 'DexClassLoader' in line:
|
if 'DexClassLoader' in line:
|
||||||
count += handleproblem('DexClassLoader', fd, fp)
|
count += handleproblem('DexClassLoader', fd, fp)
|
||||||
|
|
@ -208,7 +208,7 @@ def scan_source(build_dir, root_dir, build):
|
||||||
elif ext == 'gradle':
|
elif ext == 'gradle':
|
||||||
if not os.path.isfile(fp):
|
if not os.path.isfile(fp):
|
||||||
continue
|
continue
|
||||||
with open(fp, 'r', encoding='utf8') as f:
|
with open(fp, 'r', encoding='utf8', errors='replace') as f:
|
||||||
lines = f.readlines()
|
lines = f.readlines()
|
||||||
for i, line in enumerate(lines):
|
for i, line in enumerate(lines):
|
||||||
if is_used_by_gradle(line):
|
if is_used_by_gradle(line):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue