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
42bbdb80
Commit
42bbdb80
authored
Feb 15, 2016
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CSV parsing with Python 3
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
1e6d2aac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
weblate/trans/formats.py
weblate/trans/formats.py
+4
-3
No files found.
weblate/trans/formats.py
View file @
42bbdb80
...
@@ -1250,14 +1250,15 @@ class CSVFormat(FileFormat):
...
@@ -1250,14 +1250,15 @@ class CSVFormat(FileFormat):
# Try reading header
# Try reading header
reader
=
csv
.
reader
(
fileobj
,
store
.
dialect
)
reader
=
csv
.
reader
(
fileobj
,
store
.
dialect
)
header
=
next
(
reader
)
header
=
next
(
reader
)
fileobj
.
close
()
# We seem to have match
# We seem to have match
if
len
(
header
)
!=
2
:
if
len
(
header
)
!=
2
:
fileobj
.
close
()
return
store
return
store
fileobj
.
seek
(
0
)
result
=
storeclass
(
fieldnames
=
[
'source'
,
'target'
])
return
storeclass
(
fileobj
,
[
'source'
,
'target'
])
result
.
parse
(
content
.
encode
(
'utf-8'
))
return
result
@
register_fileformat
@
register_fileformat
...
...
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