Logger: dont try to parse None with json

This commit is contained in:
Philipp Hörist 2017-08-02 21:32:59 +02:00
parent 0c6002b9ac
commit a01611178d
1 changed files with 3 additions and 2 deletions

View File

@ -135,8 +135,9 @@ class Logger:
Row = namedtuple("Row", fields)
named_row = Row(*row)
if 'additional_data' in fields:
named_row = named_row._replace(
additional_data=json.loads(named_row.additional_data))
if named_row.additional_data is not None:
named_row = named_row._replace(
additional_data=json.loads(named_row.additional_data))
return named_row
def dispatch(self, event, error):