From c5b1d0ac46527dd77d143d538395eff2be0fef44 Mon Sep 17 00:00:00 2001 From: Deepika Upadhyay Date: Fri, 8 Jan 2021 20:32:05 +0530 Subject: [PATCH] qa/tasks/ceph: do not update info.yaml if ctx.archive is not set Signed-off-by: Deepika Upadhyay --- qa/tasks/ceph.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index 7685a132f105e..e8497565bd3f4 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -78,6 +78,8 @@ def update_archive_setting(ctx, key, value): """ Add logs directory to job's info log file """ + if ctx.archive is None: + return with open(os.path.join(ctx.archive, 'info.yaml'), 'r+') as info_file: info_yaml = yaml.safe_load(info_file) info_file.seek(0) -- 2.39.5