Fixes bug #7947 --- src/secstate/util.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/secstate/util.py b/src/secstate/util.py index fbc5d33..6a3f8bd 100644 --- a/src/secstate/util.py +++ b/src/secstate/util.py @@ -236,6 +236,7 @@ def export_xml(results_dir, id, benchmark=None, sessions=None):
def result_to_html(input, stylesheet, output, media=None, about=None, help=None): output_dir = os.path.dirname(output) + transform_params = {'path': output_dir} try: shutil.copy(stylesheet, output_dir) except IOError,e: @@ -247,6 +248,8 @@ def result_to_html(input, stylesheet, output, media=None, about=None, help=None) style = libxslt.parseStylesheetDoc(styledoc) if os.path.isfile(input): doc = libxml2.parseFile(input) + if not is_benchmark(input): + transform_params['ovalid'] = "'%s'" % os.path.basename(input.split('.results.xml')[0]) else: doc = libxml2.parseDoc(input)
@@ -254,7 +257,7 @@ def result_to_html(input, stylesheet, output, media=None, about=None, help=None) sys.stderr.write("Error parsing input: '%(in)s'" % {'in':input}) return False
- result = style.applyStylesheet(doc, {'path':output_dir}) + result = style.applyStylesheet(doc, transform_params) if not style.saveResultToFilename(output, result, 0): sys.stderr.write("Error exporitng results to %(file)s" % {'file':output}) return False
secstate-devel@lists.fedorahosted.org