mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
standardize os.walk() var names based on Python 3.5 docs
There were multiple conventions used in the code, but mostly it was already using the convention from the docs, so this converts things to using that convention: https://docs.python.org/3/library/os.html#os.walk
This commit is contained in:
parent
96e71bfdb3
commit
cb10f0df09
7 changed files with 35 additions and 35 deletions
|
|
@ -358,21 +358,21 @@ def check_license_tag(app):
|
|||
|
||||
def check_extlib_dir(apps):
|
||||
dir_path = os.path.join('build', 'extlib')
|
||||
files = set()
|
||||
for root, dirs, names in os.walk(dir_path):
|
||||
for name in names:
|
||||
files.add(os.path.join(root, name)[len(dir_path) + 1:])
|
||||
unused_extlib_files = set()
|
||||
for root, dirs, files in os.walk(dir_path):
|
||||
for name in files:
|
||||
unused_extlib_files.add(os.path.join(root, name)[len(dir_path) + 1:])
|
||||
|
||||
used = set()
|
||||
for app in apps:
|
||||
for build in app.builds:
|
||||
for path in build.extlibs:
|
||||
if path not in files:
|
||||
if path not in unused_extlib_files:
|
||||
yield "%s: Unknown extlib %s in build '%s'" % (app.id, path, build.versionName)
|
||||
else:
|
||||
used.add(path)
|
||||
|
||||
for path in files.difference(used):
|
||||
for path in unused_extlib_files.difference(used):
|
||||
if any(path.endswith(s) for s in [
|
||||
'.gitignore',
|
||||
'source.txt', 'origin.txt', 'md5.txt',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue