]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph: do not update info.yaml if ctx.archive is not set 38994/head
authorDeepika Upadhyay <dupadhya@redhat.com>
Fri, 8 Jan 2021 15:02:05 +0000 (20:32 +0530)
committerSage Weil <sage@newdream.net>
Wed, 20 Jan 2021 21:21:53 +0000 (15:21 -0600)
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
(cherry picked from commit c5b1d0ac46527dd77d143d538395eff2be0fef44)

qa/tasks/ceph.py

index e484d9127c807e48ffbc3b75ac229e43bad7bbba..9fc6942856443651679196e955e2ced8b48721ab 100644 (file)
@@ -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)