use py2-compatible way to convert datetime.datetime to timestamp
* bump version to 0.6.8
This commit is contained in:
parent
3fec44feaa
commit
9d5197d813
|
@ -56,7 +56,7 @@ author = 'Thor77'
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '0.6'
|
version = '0.6'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '0.6.7'
|
release = '0.6.8'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='tsstats',
|
name='tsstats',
|
||||||
version='0.6.7',
|
version='0.6.8',
|
||||||
author='Thor77',
|
author='Thor77',
|
||||||
author_email='thor77@thor77.org',
|
author_email='thor77@thor77.org',
|
||||||
description='A simple Teamspeak stats-generator',
|
description='A simple Teamspeak stats-generator',
|
||||||
|
|
|
@ -95,7 +95,10 @@ def parse_log(log_path, ident_map=None, clients=None, online_dc=True):
|
||||||
if online_dc:
|
if online_dc:
|
||||||
for client in clients:
|
for client in clients:
|
||||||
if client.connected:
|
if client.connected:
|
||||||
client.disconnect(int(datetime.utcnow().timestamp()))
|
client.disconnect(
|
||||||
|
int((datetime.utcnow() - datetime(1970, 1, 1))
|
||||||
|
.total_seconds())
|
||||||
|
)
|
||||||
client.connected += 1
|
client.connected += 1
|
||||||
logger.debug('Finished parsing of %s', log_file.name)
|
logger.debug('Finished parsing of %s', log_file.name)
|
||||||
return clients
|
return clients
|
||||||
|
|
Loading…
Reference in New Issue