Replace remaining file() usage

This commit is contained in:
Daniel Martí 2016-01-04 17:59:47 +01:00
parent 5026d4e08b
commit fc21dbc667
2 changed files with 42 additions and 38 deletions

View file

@ -199,10 +199,11 @@ def scan_source(build_dir, root_dir, build):
elif ext == 'java':
if not os.path.isfile(fp):
continue
for line in file(fp):
if 'DexClassLoader' in line:
count += handleproblem('DexClassLoader', fd, fp)
break
with open(fp, 'r') as f:
for line in f:
if 'DexClassLoader' in line:
count += handleproblem('DexClassLoader', fd, fp)
break
elif ext == 'gradle':
if not os.path.isfile(fp):