summaryrefslogtreecommitdiff
path: root/zuul
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@openstack.org>2013-04-26 11:17:03 -0700
committerJenkins <jenkins@review.openstack.org>2013-04-26 18:33:40 +0000
commit3c5e5b507f64e644bfc3c0fd38a646dc9a280201 (patch)
treea8715a3e4b782804d31af3f4b94a67794f155c15 /zuul
parent0ac6c0169266e41c6e49ac08d6dd957584a1adaa (diff)
downloadzuul-3c5e5b507f64e644bfc3c0fd38a646dc9a280201.tar.gz
Fix config test interaction with report_times.
In a config test, the scheduler is created without a config object. Handle that case gracefully in the pipeline constructor. Add a test that runs the configtest. Change-Id: Id59b3194aff7b5347fa04fe1cc29b1069d2a3f7f Reviewed-on: https://review.openstack.org/27585 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
Diffstat (limited to 'zuul')
-rw-r--r--zuul/scheduler.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/zuul/scheduler.py b/zuul/scheduler.py
index 7abb80364..0904f3742 100644
--- a/zuul/scheduler.py
+++ b/zuul/scheduler.py
@@ -45,6 +45,7 @@ class Scheduler(threading.Thread):
self._stopped = False
self.launcher = None
self.trigger = None
+ self.config = None
self.trigger_event_queue = Queue.Queue()
self.result_event_queue = Queue.Queue()
@@ -508,7 +509,8 @@ class BasePipelineManager(object):
self.success_action = {}
self.failure_action = {}
self.start_action = {}
- if self.sched.config.has_option('zuul', 'report_times'):
+ if self.sched.config and self.sched.config.has_option(
+ 'zuul', 'report_times'):
self.report_times = self.sched.config.getboolean(
'zuul', 'report_times')
else: