fix 2 typos in tsstats.log._bundle_logs

This commit is contained in:
Thor77 2016-06-20 21:59:46 +02:00
parent 976d40e2b9
commit 9a6bbe4f3e
1 changed files with 3 additions and 2 deletions

View File

@ -60,12 +60,13 @@ def _bundle_logs(logs):
if match:
match = match.groupdict()
timestamp = datetime.strptime('{0} {1}'.format(
match['date'], match['time'].replace('_', ':')))
match['date'], match['time'].replace('_', ':')),
log_timestamp_format)
tl = TimedLog(log, timestamp)
sid = match['sid']
if sid in vserver_logfiles:
# if already exists, keep list sorted by timestamp
vserver_logfiles[sid].apppend(tl)
vserver_logfiles[sid].append(tl)
vserver_logfiles[sid] =\
sorted(vserver_logfiles[sid],
key=lambda tl: tl.timestamp)