Read logs as utf-8

This commit is contained in:
Thor77 2016-11-02 21:24:07 +01:00
parent 1c4ee4d72d
commit c0096a7c52
1 changed files with 2 additions and 1 deletions

View File

@ -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: