From d67b2a0097dba876d609dfa9ad92968101d4b879 Mon Sep 17 00:00:00 2001 From: matbu Date: Tue, 6 Apr 2021 23:22:44 +0200 Subject: [PATCH] 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 --- validations_common/callback_plugins/validation_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validations_common/callback_plugins/validation_json.py b/validations_common/callback_plugins/validation_json.py index 6772982..fba6c0b 100644 --- a/validations_common/callback_plugins/validation_json.py +++ b/validations_common/callback_plugins/validation_json.py @@ -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():