# HG changeset patch # User Gernot Schulz # Date 1454251295 -3600 # Node ID b5f7a439bddd1d0e6ec5da311bd1a90f90e230c2 # Parent 149d01f43e31ab56658ed5fb1a45d8cd2549d66c Allow to override default graph.html file diff -r 149d01f43e31 -r b5f7a439bddd display_issues.py --- a/display_issues.py Sun Jan 31 13:15:08 2016 +0100 +++ b/display_issues.py Sun Jan 31 15:41:35 2016 +0100 @@ -40,9 +40,10 @@ return ", ".join(formated) -def get_webpage(): +def get_webpage(graph=None): - graph = os.path.dirname(os.path.realpath(__file__)) + '/graph.html' + if graph is None: + graph = os.path.dirname(os.path.realpath(__file__)) + '/graph.html' with open(graph, "r") as html_chart_file: base_html_data = html_chart_file.read() @@ -57,7 +58,7 @@ return base_html_data -def compile_db_stats_html(db_file, sql_select): +def compile_db_stats_html(db_file, sql_select, graph=None): con = None cur = None @@ -80,7 +81,7 @@ if con: con.close() - return get_webpage() + return get_webpage(graph) def render_webpage(content): for line in content.split("\n"):