]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Task: Tolerate a missing ctx.config 1135/head
authorZack Cerza <zack@redhat.com>
Tue, 5 Dec 2017 21:20:11 +0000 (14:20 -0700)
committerZack Cerza <zack@redhat.com>
Tue, 5 Dec 2017 21:22:04 +0000 (14:22 -0700)
When we initialize a ConsoleLog task during FOG reimaging, the ctx
object has no config attribute.

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/task/__init__.py

index 31b19acfe41b4e1b37e51ab8983f464c6cd812be..725c5c872dcb92975272d0376c6698e84d4c5896 100644 (file)
@@ -41,6 +41,8 @@ class Task(object):
         dict with the same name as this task. Override any settings in
         self.config with those overrides
         """
+        if not hasattr(self.ctx, 'config'):
+            return
         all_overrides = self.ctx.config.get('overrides', dict())
         if not all_overrides:
             return