From: Marcus Hoffmann Date: Mon, 4 Sep 2017 14:11:27 +0000 (+0200) Subject: scanner: more descriptive variable names from os.walk X-Git-Tag: 0.9~57^2~4 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1ee3f9aad5ffc2f9864d9b3a164197fea632de09;hp=546b09cd93c6366c3c3a24ba2863ae1dce44152b;p=fdroidserver.git scanner: more descriptive variable names from os.walk This uses the names from python documentation of os.walk(). --- diff --git a/fdroidserver/scanner.py b/fdroidserver/scanner.py index 52020c89..87b7ed63 100644 --- a/fdroidserver/scanner.py +++ b/fdroidserver/scanner.py @@ -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 r, d, f in os.walk(build_dir, topdown=True): + for dirpath, dirnames, filenames 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 d: - d.remove(ignoredir) + if ignoredir in dirnames: + dirnames.remove(ignoredir) - for curfile in f: + for curfile in filenames: if curfile in ['.DS_Store']: continue # Path (relative) to the file - fp = os.path.join(r, curfile) + fp = os.path.join(dirpath, curfile) if os.path.islink(fp): continue