Skip to content

Commit bdac0cb

Browse files
authored
Use str instead of basestring
'basestring' is deprecated in Python 3
1 parent 1c2321f commit bdac0cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kafka_logger/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def prepare_record_dict(self, record):
161161
# but it is not 1:1 - logging "inf" float
162162
# causes _jsonparsefailure error in ELK
163163
value = tuple(repr(arg) for arg in value)
164-
if key == "msg" and not isinstance(value, basestring):
164+
if key == "msg" and not isinstance(value, str):
165165
# msg contains custom class object
166166
# if there is no formatting in the logging call
167167
value = str(value)

0 commit comments

Comments
 (0)