make __main__.main work with new output of tsstats.log.parse_logs

* if sid given, add .<sid> to outputpath
This commit is contained in:
Thor77 2016-06-22 20:47:12 +02:00
parent eafc98f548
commit 95c22dde35
1 changed files with 7 additions and 2 deletions

View File

@ -64,8 +64,13 @@ def main(config=None, idmap=None, log=None, output=None, debug=False):
if not log or not output:
raise InvalidConfiguration('log or output missing')
clients = parse_logs(log, ident_map=identmap)
render_template(clients, output=abspath(output))
sid_clients = parse_logs(log, ident_map=identmap)
for sid, clients in sid_clients.items():
if sid:
ext = '.{}'.format(sid)
else:
ext = ''
render_template(clients, output=abspath(output + ext))
if __name__ == '__main__':