From 9a38e0e7cbc065a4bc548e730b4c6242f9d482ca Mon Sep 17 00:00:00 2001 From: Thor77 Date: Fri, 18 Nov 2016 21:46:38 +0100 Subject: [PATCH] Rename template_path to template --- tsstats/__main__.py | 2 +- tsstats/template.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tsstats/__main__.py b/tsstats/__main__.py index cf9ffa0..1737e4e 100644 --- a/tsstats/__main__.py +++ b/tsstats/__main__.py @@ -94,7 +94,7 @@ def main(configuration): render_template( clients, output=abspath(configuration.get('General', 'output') + ext), - template_path=configuration.get('General', 'template'), + template=configuration.get('General', 'template'), datetime_fmt=configuration.get('General', 'datetimeformat'), onlinetime_threshold=int(configuration.get( 'General', 'onlinetimethreshold')) diff --git a/tsstats/template.py b/tsstats/template.py index 093e212..c1e1866 100644 --- a/tsstats/template.py +++ b/tsstats/template.py @@ -13,7 +13,7 @@ logger = logging.getLogger('tsstats') def render_template(clients, output, title='TeamspeakStats', - template_path='template.html', datetime_fmt='%x %X %Z', + template='template.html', datetime_fmt='%x %X %Z', onlinetime_threshold=-1): ''' render template with `clients` @@ -69,7 +69,7 @@ def render_template(clients, output, title='TeamspeakStats', logger.debug('Formatting timestamp %s -> %s', timestamp, formatted) return formatted template_env.filters['frmttime'] = frmttime - template = template_env.get_template(template_path) + template = template_env.get_template(template) logger.debug('Rendering template %s', template) with open(output, 'w', encoding='utf-8') as f: f.write(template.render(title=title, objs=objs,