From 05b592db57216d3ba7ecafac568f1b5b4ba19846 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 (cherry picked from commit c5b1d0ac46527dd77d143d538395eff2be0fef44) --- qa/tasks/ceph.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index e484d9127c80..9fc694285644 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.47.3