mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 23:42:37 +03:00
remove redundant open() arg: encoding='utf8'
By default, open() returns a str: https://docs.python.org/3/library/functions.html#open By default, str is UTF-8: https://docs.python.org/3/library/stdtypes.html#str This used to matter on Python 2.x, but this code is 3.x only now.
This commit is contained in:
parent
6e5d1a6cc3
commit
57556aceee
9 changed files with 27 additions and 27 deletions
|
@ -230,7 +230,7 @@ def scan_source(build_dir, build=metadata.Build()):
|
|||
elif ext == 'java':
|
||||
if not os.path.isfile(filepath):
|
||||
continue
|
||||
with open(filepath, 'r', encoding='utf8', errors='replace') as f:
|
||||
with open(filepath, 'r', errors='replace') as f:
|
||||
for line in f:
|
||||
if 'DexClassLoader' in line:
|
||||
count += handleproblem('DexClassLoader', path_in_build_dir, filepath)
|
||||
|
@ -239,7 +239,7 @@ def scan_source(build_dir, build=metadata.Build()):
|
|||
elif ext == 'gradle':
|
||||
if not os.path.isfile(filepath):
|
||||
continue
|
||||
with open(filepath, 'r', encoding='utf8', errors='replace') as f:
|
||||
with open(filepath, 'r', errors='replace') as f:
|
||||
lines = f.readlines()
|
||||
for i, line in enumerate(lines):
|
||||
if is_used_by_gradle(line):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue