From 65a83792615d6aafdd1f26494e0d083b028741fd Mon Sep 17 00:00:00 2001 From: Thor77 Date: Sat, 20 May 2017 00:31:26 +0200 Subject: [PATCH] Use pendulum instead of plain datetime because it is more intuitive to use and doesn't require the tz_aware_datetime-workaround. --- requirements.txt | 1 + tsstats/log.py | 17 +++++++--------- tsstats/template.py | 10 ++++----- tsstats/tests/test_log.py | 37 ++++++++++++++++++++++------------ tsstats/tests/test_template.py | 4 ++-- tsstats/utils.py | 31 ---------------------------- 6 files changed, 38 insertions(+), 62 deletions(-) diff --git a/requirements.txt b/requirements.txt index f10e84e..a673ff4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ Jinja2>=2.8 +pendulum diff --git a/tsstats/log.py b/tsstats/log.py index 1a4ff80..ca28156 100644 --- a/tsstats/log.py +++ b/tsstats/log.py @@ -4,13 +4,13 @@ import logging import re from codecs import open from collections import namedtuple -from datetime import datetime from glob import glob from os.path import basename from time import time +import pendulum + from tsstats.client import Client, Clients -from tsstats.utils import tz_aware_datime re_log_filename = re.compile(r'ts3server_(?P\d{4}-\d\d-\d\d)' '__(?P