mirror of
https://github.com/Thor77/TeamspeakStats.git
synced 2025-07-07 07:58:43 -04:00
Read logs as utf-8
This commit is contained in:
parent
1c4ee4d72d
commit
c0096a7c52
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
from codecs import open
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from glob import glob
|
from glob import glob
|
||||||
|
@ -115,7 +116,7 @@ def _parse_details(log_path, ident_map=None, clients=None, online_dc=True):
|
||||||
'''
|
'''
|
||||||
if clients is None:
|
if clients is None:
|
||||||
clients = Clients(ident_map)
|
clients = Clients(ident_map)
|
||||||
log_file = open(log_path)
|
log_file = open(log_path, encoding='utf-8')
|
||||||
# process lines
|
# process lines
|
||||||
logger.debug('Started parsing of %s', log_file.name)
|
logger.debug('Started parsing of %s', log_file.name)
|
||||||
for line in log_file:
|
for line in log_file:
|
||||||
|
|
Loading…
Add table
Reference in a new issue