Browse Source

Constants path formatting unification

Paths in the constants.py are now formatted
using a single function, the os.path.join.

This both normalizes the code and reduces
chance of errors and confusion arising
from nonstandard paths.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I761c4449579590b9081a78627eeac754d6b04e2a
changes/31/790031/2
Jiri Podivin 1 month ago
parent
commit
b3903d2a81
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      validations_libs/constants.py

+ 6
- 3
validations_libs/constants.py View File

@ -18,7 +18,9 @@ DEFAULT_VALIDATIONS_BASEDIR = '/usr/share/ansible/'
ANSIBLE_VALIDATION_DIR = '/usr/share/ansible/validation-playbooks'
VALIDATION_GROUPS_INFO = '%s/groups.yaml' % DEFAULT_VALIDATIONS_BASEDIR
VALIDATION_GROUPS_INFO = os.path.join(
DEFAULT_VALIDATIONS_BASEDIR,
'groups.yaml')
VALIDATION_GROUPS = ['no-op',
'prep',
@ -26,5 +28,6 @@ VALIDATION_GROUPS = ['no-op',
VALIDATIONS_LOG_BASEDIR = os.path.join(os.environ.get('HOME'), 'validations')
VALIDATION_ANSIBLE_ARTIFACT_PATH = '{}/artifacts/'.format(
VALIDATIONS_LOG_BASEDIR)
VALIDATION_ANSIBLE_ARTIFACT_PATH = os.path.join(
VALIDATIONS_LOG_BASEDIR,
'artifacts')

Loading…
Cancel
Save