Skip to content

Commit 312462d

Browse files
committed
Fix exception handle while decoding JSON message
This was meant to handle simplejson's exception class but it makes no sense if it's inheriting from ValueError and would raise an exception if simplejson is not installed which is not acceptable. See #16.
1 parent f54dda2 commit 312462d

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
@@ -50,7 +50,7 @@ def _structuring(self, data, msg):
5050
elif isinstance(msg, basestring):
5151
try:
5252
self._add_dic(data, json.loads(str(msg)))
53-
except (ValueError, json.JSONDecodeError):
53+
except ValueError:
5454
self._add_dic(data, {'message': msg})
5555

5656
@staticmethod

0 commit comments

Comments
 (0)