Fix pep8/flakes results

This commit is contained in:
Joshua Hesketh 2013-08-12 10:33:40 +10:00
parent 1c156d213a
commit 3c0490b12a
3 changed files with 7 additions and 6 deletions

View File

@ -139,6 +139,7 @@ def execute_to_log(cmd, logfile, timeout=-1,
def process(fd): def process(fd):
""" Write the fd to log """ """ Write the fd to log """
global last_heartbeat
descriptors[fd]['lines'] += os.read(fd, 1024 * 1024) descriptors[fd]['lines'] += os.read(fd, 1024 * 1024)
# Avoid partial lines by only processing input with breaks # Avoid partial lines by only processing input with breaks
if descriptors[fd]['lines'].find('\n') != -1: if descriptors[fd]['lines'].find('\n') != -1:
@ -177,8 +178,7 @@ def push_file(job_name, file_path, publish_config):
""" Push a log file to a server. Returns the public URL """ """ Push a log file to a server. Returns the public URL """
method = publish_config['type'] + '_push_file' method = publish_config['type'] + '_push_file'
if method in locals(): if method in locals():
return locals(method)(job_name, dataset['log_file_path'], return locals(method)(job_name, file_path, publish_config)
publish_config)
def swift_push_file(job_name, file_path, swift_config): def swift_push_file(job_name, file_path, swift_config):

View File

@ -46,10 +46,11 @@ def generate_push_results(datasets):
publish_config)) publish_config))
datasets[i]['files'] = files datasets[i]['files'] = files
index_file = make_index_file(datasets) #index_file = make_index_file(datasets)
#index_file_url = push_file(index_file) #index_file_url = push_file(index_file)
return files[0] return files[0]
def check_log_for_errors(logfile): def check_log_for_errors(logfile):
return True return True

View File

@ -153,7 +153,7 @@ class Runner(threading.Thread):
result = \ result = \
handle_results.check_log_for_errors(dataset['log_file_path']) handle_results.check_log_for_errors(dataset['log_file_path'])
if not result: if not result:
failed = true failed = True
break break
if failed: if failed: