Fix NameError for missing query.

This commit is contained in:
Ralph Bean
2016-08-10 13:48:15 -04:00
parent 36947b07a5
commit 124b3c3900
2 changed files with 2 additions and 2 deletions

View File

@@ -160,7 +160,6 @@ class Config(object):
def koji_config(self, s):
self._koji_config = str(s)
@property
def koji_profile(self):
"""Koji URL."""

View File

@@ -233,7 +233,8 @@ class Poller(threading.Thread):
log.info(" * internal queue backlog is %i." % backlog)
states = sorted(models.BUILD_STATES.items(), key=operator.itemgetter(1))
for name, code in states:
count = models.ModuleBuild.query.filter_by(state=code).count()
query = models.ModuleBuild.query.filter_by(state=code)
count = query.count()
if count:
log.info(" * %i module builds in the %s state." % (count, name))
if name == 'build':