From e6a7bc854cabc99eff1b46109fcde7eb28aaac23 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 15 Jun 2021 21:35:34 +0200 Subject: [PATCH] Only consider directories which do have .deps files other than ancestor.deps. (#74987) --- .../build_ansible/command_plugins/docs_build.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hacking/build_library/build_ansible/command_plugins/docs_build.py b/hacking/build_library/build_ansible/command_plugins/docs_build.py index e38ef2010c0..ecb5022beb9 100644 --- a/hacking/build_library/build_ansible/command_plugins/docs_build.py +++ b/hacking/build_library/build_ansible/command_plugins/docs_build.py @@ -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