]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph: do not update info.yaml if ctx.archive is not set 38817/head
authorDeepika Upadhyay <dupadhya@redhat.com>
Fri, 8 Jan 2021 15:02:05 +0000 (20:32 +0530)
committerDeepika Upadhyay <dupadhya@redhat.com>
Fri, 8 Jan 2021 17:27:55 +0000 (22:57 +0530)
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
qa/tasks/ceph.py

index 7685a132f105e34b59794c4e7063fa02449a06f2..e8497565bd3f4a358da2ba410a15fe5def6c20c5 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)