Skip to content

Commit e35751b

Browse files
author
Jazeps Basko
committed
There is no JSONDecodeError class in built-in json (at least for me on Python 2.7.5). It is only present in simplejson, but in simplejson it's a subclass of ValueError so removing it from the tuple of exception classes doesn't change behaviour
1 parent feafd21 commit e35751b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fluent/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _structuring(self, data, msg):
3838
elif isinstance(msg, str):
3939
try:
4040
self._add_dic(data, json.loads(str(msg)))
41-
except (ValueError, json.JSONDecodeError):
41+
except ValueError:
4242
pass
4343

4444
@staticmethod

0 commit comments

Comments
 (0)