mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20: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
|
|
@ -165,20 +165,20 @@ def scan_source(build_dir, build):
|
|||
return any(command.match(line) for command in gradle_compile_commands)
|
||||
|
||||
# Iterate through all files in the source code
|
||||
for dirpath, dirnames, filenames in os.walk(build_dir, topdown=True):
|
||||
for root, dirs, files in os.walk(build_dir, topdown=True):
|
||||
|
||||
# It's topdown, so checking the basename is enough
|
||||
for ignoredir in ('.hg', '.git', '.svn', '.bzr'):
|
||||
if ignoredir in dirnames:
|
||||
dirnames.remove(ignoredir)
|
||||
if ignoredir in dirs:
|
||||
dirs.remove(ignoredir)
|
||||
|
||||
for curfile in filenames:
|
||||
for curfile in files:
|
||||
|
||||
if curfile in ['.DS_Store']:
|
||||
continue
|
||||
|
||||
# Path (relative) to the file
|
||||
filepath = os.path.join(dirpath, curfile)
|
||||
filepath = os.path.join(root, curfile)
|
||||
|
||||
if os.path.islink(filepath):
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue