Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
91cdaf4b
Commit
91cdaf4b
authored
Feb 13, 2016
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use BytesIO for raw data processing
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
92748cd8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
weblate/trans/formats.py
weblate/trans/formats.py
+3
-4
No files found.
weblate/trans/formats.py
View file @
91cdaf4b
...
@@ -23,6 +23,7 @@ File format specific behavior.
...
@@ -23,6 +23,7 @@ File format specific behavior.
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
from
io
import
BytesIO
import
subprocess
import
subprocess
import
os.path
import
os.path
import
re
import
re
...
@@ -33,7 +34,6 @@ import importlib
...
@@ -33,7 +34,6 @@ import importlib
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.utils.translation
import
ugettext_lazy
as
_
import
six
import
six
from
six
import
StringIO
from
translate.convert
import
po2php
from
translate.convert
import
po2php
from
translate.storage.lisa
import
LISAfile
from
translate.storage.lisa
import
LISAfile
...
@@ -62,13 +62,12 @@ class ParseError(Exception):
...
@@ -62,13 +62,12 @@ class ParseError(Exception):
"""Generic error for parsing."""
"""Generic error for parsing."""
class
StringIOMode
(
String
IO
):
class
StringIOMode
(
Bytes
IO
):
"""
"""
StringIO with mode attribute to make ttkit happy.
StringIO with mode attribute to make ttkit happy.
"""
"""
def
__init__
(
self
,
filename
,
data
):
def
__init__
(
self
,
filename
,
data
):
# pylint: disable=W0233
super
(
StringIOMode
,
self
).
__init__
(
self
,
data
)
StringIO
.
__init__
(
self
,
data
)
self
.
mode
=
'r'
self
.
mode
=
'r'
self
.
name
=
filename
self
.
name
=
filename
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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