From: Deepika Upadhyay Date: Fri, 8 Jan 2021 15:02:05 +0000 (+0530) Subject: qa/tasks/ceph: do not update info.yaml if ctx.archive is not set X-Git-Tag: v16.2.0~246^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F38994%2Fhead;p=ceph.git qa/tasks/ceph: do not update info.yaml if ctx.archive is not set Signed-off-by: Deepika Upadhyay (cherry picked from commit c5b1d0ac46527dd77d143d538395eff2be0fef44) --- 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)