Browse Source

Fallback on PWD for the Validation json log instead of getcwd

fallback on getcwd is wrong because the current directory for
the ansible runtime is somewhere in the artifact dir..
We should fallback in the PWD of the current user instead, then
the user and the framework could find the log when
/var/log/validations does not exists

Change-Id: Ida25474d687fba690ab6a342ac61a484e6d939fa
changes/50/785050/1
matbu 1 month ago
parent
commit
d67b2a0097
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      validations_common/callback_plugins/validation_json.py

+ 1
- 1
validations_common/callback_plugins/validation_json.py View File

@ -40,7 +40,7 @@ VALIDATIONS_LOG_DIR = (os.getenv('VALIDATIONS_LOG_DIR')
('/var/log/validations'
if os.path.exists('/var/log/validations')
and os.access('/var/log/validations', os.W_OK) else
os.getcwd()))
os.environ.get('PWD')))
def current_time():


Loading…
Cancel
Save