From a43ffef7e79d2cecce032e8b4275086f048b1bb5 Mon Sep 17 00:00:00 2001 From: Jiri Podivin Date: Wed, 23 Jun 2021 12:06:10 +0200 Subject: [PATCH] Callback logging unification Callback logs the validations results into '$HOME/validations' if the 'VALIDATIONS_LOG_DIR' environment variable is not set. This brings VC in line with VL. The home folder location is now obtained trought the expansion on of the '~' char. Preventing issues when caused by an unset '$HOME'. Using the insight from the I13ba1b2eb0b11c2aded35b44c7fbae643210a269 by fressi. Signed-off-by: Jiri Podivin Change-Id: Ib0e98989d6777aac22c4414b68a7b3e6061aece1 --- 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 af927ab..bd2d9c3 100644 --- a/validations_common/callback_plugins/validation_json.py +++ b/validations_common/callback_plugins/validation_json.py @@ -39,7 +39,7 @@ DOCUMENTATION = ''' VALIDATIONS_LOG_DIR = os.environ.get( 'VALIDATIONS_LOG_DIR', - os.environ.get('HOME')) + os.path.expanduser('~/validations')) def current_time():