I have a bunch of style nits for you. On Monday, February 24, 2014 04:56:58 PM Thomas Wood wrote: > Signed-off-by: Thomas Wood <[email protected]> > --- > framework/summary.py | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/framework/summary.py b/framework/summary.py > index 2fc16ce..c1104c3 100644 > --- a/framework/summary.py > +++ b/framework/summary.py > @@ -26,6 +26,7 @@ import shutil > import collections > import tempfile > from mako.template import Template > +from datetime import timedelta
Imports should be ordered buitlins, 3rd party modules, then local modules.
Move datetime before mako.template
>
> # a local variable status exists, prevent accidental overloading by
> renaming # the module
> @@ -379,7 +380,7 @@ class Summary:
>
> with open(path.join(destination, each.name, "index.html"), 'w')
> as out: out.write(testindex.render(name=each.name,
> - time=each.time_elapsed,
> + time=str(timedelta(0,each.time_elapsed)),
Please add a space after the comma.
> options=each.options,
> glxinfo=each.glxinfo,
> lspci=each.lspci))
> @@ -401,6 +402,7 @@ class Summary:
>
> with open(path.join(destination, each.name, key +
> ".html"), 'w') as out:
> + time=value.get('time', 'None')
operators should have spaces between them unless they are keyword declarations
in functions. So this should be: time = value.get('time', 'None')
> out.write(testfile.render(
> testname=key,
> status=value.get('result', 'None'),
> @@ -410,7 +412,7 @@ class Summary:
> # disapear at somepoint
> env=value.get('environment', None),
> returncode=value.get('returncode', 'None'),
> - time=value.get('time', 'None'),
> + time=time if time == 'None' else
> str(timedelta(0, time)), info=value.get('info', 'None'),
I'm really not a fan of this, but I don't see any better way to do it, maybe
someone else will.
> traceback=value.get('traceback', 'None'),
> command=value.get('command', 'None'),
With those changes, this patch is:
Reviewed-by: Dylan Baker <[email protected]>
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
