Commit 01db44c6 authored by Ryan Herbert's avatar Ryan Herbert Committed by Mikaël Salson
Browse files python3-compatible type check

parent 1c2b42a8
import ijson
from six import string_types
class VidjilWriter(object):
......@@ -49,7 +50,7 @@ class VidjilWriter(object):
value = str(value).lower()
mstr = '{}'
padding = ''
if type(value) in [str, unicode] :
if isinstance(value, string_types) :
value = value.replace("\n", "\\n")
value = value.replace("\r", "\\r")
if previous not in ['', 'map_key', 'start_map', 'start_array'] and event not in ['end_map', 'end_array']:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment