Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
01db44c6
Commit
01db44c6
authored
Jun 07, 2018
by
Ryan Herbert
Committed by
Mikaël Salson
Jul 18, 2018
Browse files
vidjilparser.py python3-compatible type check
parent
1c2b42a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/vidjilparser.py
View file @
01db44c6
#!/usr/bin/python
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'
]:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment