From e66ede3d9a8d08aa4512ab58b34e7440f925101b Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Thu, 18 Apr 2013 22:22:07 +0100 Subject: [PATCH] Fix case where no LBs need repair Change-Id: Iafa87cbf64c5c1a2732c9a5e9d142bee8551653c --- libra/statsd/scheduler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libra/statsd/scheduler.py b/libra/statsd/scheduler.py index cb43a499..8c9211f0 100644 --- a/libra/statsd/scheduler.py +++ b/libra/statsd/scheduler.py @@ -112,6 +112,9 @@ class Sched(object): if api.is_online(): lb_list = api.get_repair_list() tested = len(lb_list) + if tested == 0: + self.logger.info('No LBs need repair') + return (0, 0) for lb in lb_list: node_list.append(lb['name']) gearman = GearJobs(self.logger, self.args)