Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7de63f57
Commit
7de63f57
authored
May 20, 2003
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GNUTranslations._parse(): Fix SF bug #658233, where continuation lines
in .po metadata caused a crash. Backport candidate.
parent
15eac1f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
Lib/gettext.py
Lib/gettext.py
+9
-4
No files found.
Lib/gettext.py
View file @
7de63f57
...
...
@@ -261,14 +261,19 @@ class GNUTranslations(NullTranslations):
# See if we'
re
looking
at
GNU
.
mo
conventions
for
metadata
if
mlen
==
0
:
# Catalog description
lastk
=
None
for
item
in
tmsg
.
splitlines
():
item
=
item
.
strip
()
if
not
item
:
continue
k
,
v
=
item
.
split
(
':'
,
1
)
k
=
k
.
strip
().
lower
()
v
=
v
.
strip
()
self
.
_info
[
k
]
=
v
if
':'
in
item
:
k
,
v
=
item
.
split
(
':'
,
1
)
k
=
k
.
strip
().
lower
()
v
=
v
.
strip
()
self
.
_info
[
k
]
=
v
lastk
=
k
elif
lastk
:
self
.
_info
[
lastk
]
+=
'
\
n
'
+
item
if
k
==
'content-type'
:
self
.
_charset
=
v
.
split
(
'charset='
)[
1
]
elif
k
==
'plural-forms'
:
...
...
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