mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 02:50:12 +01:00
Correct traversing cibase
Partly revertd9aab228
and fix bug introduced in548f73d9
: modifying list that is being iterated over
This commit is contained in:
parent
88a23f3a33
commit
8e89cf511d
@ -438,17 +438,12 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
|
|||||||
)
|
)
|
||||||
|
|
||||||
for root, dirs, files in os.walk(cibase):
|
for root, dirs, files in os.walk(cibase):
|
||||||
if root.startswith(repo_basedir):
|
for d in ('.git', '.gradle'):
|
||||||
logging.error(
|
if d in dirs:
|
||||||
_('Broken dirs.remove(d): {root} is part of {repo_basedir} and should not be scanned').format(
|
|
||||||
root=root,
|
|
||||||
repo_basedir=repo_basedir
|
|
||||||
)
|
|
||||||
)
|
|
||||||
continue
|
|
||||||
for d in dirs:
|
|
||||||
if d == '.git' or d == '.gradle' or (d == 'fdroid' and root == cibase):
|
|
||||||
dirs.remove(d)
|
dirs.remove(d)
|
||||||
|
if root == cibase and 'fdroid' in dirs:
|
||||||
|
dirs.remove('fdroid')
|
||||||
|
|
||||||
for f in files:
|
for f in files:
|
||||||
if f.endswith('-debug.apk'):
|
if f.endswith('-debug.apk'):
|
||||||
apkfilename = os.path.join(root, f)
|
apkfilename = os.path.join(root, f)
|
||||||
|
Loading…
Reference in New Issue
Block a user