fix tsstats.log.parse_logs not returning clients
This commit is contained in:
parent
53ffad3d81
commit
42d8c74f72
|
@ -56,7 +56,7 @@ author = 'Thor77'
|
|||
# The short X.Y version.
|
||||
version = '0.4'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.4.0'
|
||||
release = '0.4.1'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
|
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import setup
|
|||
|
||||
setup(
|
||||
name='tsstats',
|
||||
version='0.4.0',
|
||||
version='0.4.1',
|
||||
author='Thor77',
|
||||
author_email='thor77@thor77.org',
|
||||
description='A simple Teamspeak stats-generator',
|
||||
|
|
|
@ -15,11 +15,14 @@ logger = logging.getLogger('tsstats')
|
|||
|
||||
|
||||
def parse_logs(log_glob, ident_map=None):
|
||||
clients = Clients(ident_map)
|
||||
for log_file in sorted(log_file for log_file in glob(log_glob)):
|
||||
parse_log(log_file, ident_map)
|
||||
clients = parse_log(log_file, ident_map, clients)
|
||||
return clients
|
||||
|
||||
|
||||
def parse_log(log_path, ident_map=None):
|
||||
def parse_log(log_path, ident_map=None, clients=None):
|
||||
if not clients:
|
||||
clients = Clients(ident_map)
|
||||
log_file = open(log_path)
|
||||
# process lines
|
||||
|
|
Loading…
Reference in New Issue