Fix if conditions in constants.py

the if condition L109 is missing the check os.path.exists

Cherry-pick from (c1b3203fbf)
Change-Id: I6bba2ee4ee211aeb8bff4db861f9a65206d627e1
This commit is contained in:
Mathieu Bultel 2020-09-23 20:46:30 +02:00 committed by mathieu bultel
parent 9a7411cb03
commit 69896778ba
1 changed files with 2 additions and 1 deletions

View File

@ -106,7 +106,8 @@ ANSIBLE_INVENTORY = os.path.join(DEFAULT_WORK_DIR,
ANSIBLE_VALIDATION_DIR = (
os.path.join(DEFAULT_VALIDATIONS_LEGACY_BASEDIR, 'playbooks')
if os.path.join(DEFAULT_VALIDATIONS_LEGACY_BASEDIR, 'playbooks')
if os.path.exists(os.path.join(DEFAULT_VALIDATIONS_LEGACY_BASEDIR,
'playbooks'))
else "/usr/share/ansible/validation-playbooks"
)