From 34e8d279fd40760e36d6b50ce7952780a65abb8c Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Sat, 6 Nov 2010 14:38:44 +0300 Subject: [PATCH] Split long line, add more information in asserts --- web/build.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/web/build.py b/web/build.py index 399e0052..2ad9aa86 100755 --- a/web/build.py +++ b/web/build.py @@ -75,16 +75,11 @@ def build_link(myself, tree, host, compiler, rev, status): else: opt_rev = '' return "%s" % ( - myself, tree, host, compiler, opt_rev, status) + myself, tree, host, compiler, opt_rev, status) def html_build_status(status): - cstatus = status.get("config") - bstatus = status.get("build") - istatus = status.get("install") - tstatus = status.get("test") - sstatus = status.get("checker") - other_failures = status.get("other") + ((cstatus, bstatus, istatus, tstatus, sstatus), other_failures) = status def span(classname, contents): return "%s" % (classname, contents) @@ -375,9 +370,9 @@ def show_oldrevs(myself, tree, host, compiler): def view_build(myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" # ensure the params are valid before using them - assert host in hosts, "unknown host" - assert compiler in compilers, "unknown compiler" - assert tree in trees, "not a build tree" + assert host in hosts, "unknown host %s" % host + assert compiler in compilers, "unknown compiler %s" % compiler + assert tree in trees, "not a build tree %s" % tree uname = "" cflags = "" @@ -413,7 +408,8 @@ def view_build(myself, tree, host, compiler, rev, plain_logs=False): yield util.FileLoad("../web/%s.html" % host) yield "" - yield "" % (myself, host, tree, compiler, host, hosts[host]) + yield "" % (myself, host, tree, compiler, host, hosts[host]) yield "" % uname yield "" % tree_link(myself, tree) yield "" % revision_link(myself, revision, tree) @@ -433,7 +429,9 @@ def view_build(myself, tree, host, compiler, rev, plain_logs=False): yield "
" if not plain_logs: - yield "

Switch to the Plain View

" % (myself, host, tree, compiler, rev_var) + yield "

Switch to the Plain View

" % (myself, host, tree, compiler, rev_var) yield "
" # These can be pretty wide -- perhaps we need to @@ -453,7 +451,9 @@ def view_build(myself, tree, host, compiler, rev, plain_logs=False): yield "

Some of the above icons derived from the Gnome Project's stock icons.

" yield "
" else: - yield "

Switch to the Enhanced View

" % (myself, host, tree, compiler, rev_var) + yield "

Switch to the Enhanced View

" % (myself, host, tree, compiler, rev_var) if err == "": yield "

No error log available

" else: -- 2.34.1
Host:%s - %s
Host:%s - %s
Uname:%s
Tree:%s
Build Revision:%s