Fix pep8 issues

This commit is contained in:
Joshua Hesketh 2013-09-17 13:34:46 +10:00
parent 0e471a7dd6
commit 1217693a01
3 changed files with 9 additions and 6 deletions

View File

@ -111,12 +111,13 @@ def check_log_for_errors(logfile, gitpath):
# Check the final version is as expected
final_version = MIGRATION_FINAL_SCHEMA_RE.findall(line)[0]
if int(final_version) != max(schemas):
return False, "Final schema version does not match expectation"
return False, ("Final schema version does not match "
"expectation")
if migration_started:
# We never saw the end of a migration,
# something must have failed
return False, ("FAILURE: Did not find the end of a migration "
"after a start")
"after a start")
return True, "SUCCESS"

View File

@ -306,7 +306,8 @@ class Runner(threading.Thread):
self.log.debug("Grab the patchset we want to test against")
repo = utils.GitRepository(
self.global_config['zuul_server']['git_url'] + project_name + '/.git',
self.global_config['zuul_server']['git_url'] +
project_name + '/.git',
os.path.join(
self.global_config['git_working_dir'],
__worker_name__,

View File

@ -21,7 +21,6 @@ task_plugins. """
import argparse
import daemon
import extras
import imp
import json
import logging
import os
@ -79,8 +78,10 @@ class Server(object):
""" Run the tasks """
for plugin in self.plugins:
module = plugin['module']
self.tasks[module.__worker_name__] = module.Runner(self.config,
plugin['plugin_config'])
self.tasks[module.__worker_name__] = module.Runner(
self.config,
plugin['plugin_config']
)
self.tasks[module.__worker_name__].daemon = True
self.tasks[module.__worker_name__].start()