make __main__.main work with new output of tsstats.log.parse_logs
* if sid given, add .<sid> to outputpath
This commit is contained in:
parent
eafc98f548
commit
95c22dde35
|
@ -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__':
|
||||
|
|
Loading…
Reference in New Issue