Only consider directories which do have .deps files other than ancestor.deps. (#74987)

This commit is contained in:
Felix Fontein 2021-06-15 21:35:34 +02:00 committed by GitHub
parent 7f6edd78f9
commit e6a7bc854c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -54,6 +54,13 @@ def find_latest_ansible_dir(build_data_working):
except InvalidVersion:
continue
# Check if it contains any other .deps files than ancestor.deps
deps_files = [
df for df in glob.glob(os.path.join(directory_name, '*.deps'))
if os.path.basename(df) != 'ancestor.deps']
if not deps_files:
continue
if new_version > latest_ver:
latest_ver = new_version
latest = directory_name