Ubuntu

polib.py raise a IOException when po file has a commented line in blank

Reported by Xangel on 2012-10-19
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
polib (Ubuntu)
Medium
Angel Abad

Bug Description

If the po file contains a empty comment line, for example:

#. The next line is commented
#.
#. This also

The parser raise a IO exception.

Ubuntu version:
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise

Xangel (angel-berlanas) wrote :

Simple path to solve the problem

description: updated

The attachment "simpleParserForComments.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Angel Abad (angelabad) on 2012-10-19
Changed in polib (Ubuntu):
assignee: nobody → Angel Abad (angelabad)
importance: Undecided → Medium
status: New → Confirmed
izi (izimobil) wrote :

Hi (I'm the polib author),

I'm a bit confused by the patch since it doesn't fix the described issue, the patch is on the flagline (#,) code block and the issue is related to comments (#.).

I'll have look at this and will release a bugfix version.

Xangel (angel-berlanas) wrote :

Correct, the patch is wrong: (sorry)

this is the line

elif tokens[0] == '#.' and nb_tokens > 1:

must be:

elif tokens[0] == '#.' :

Angel Abad (angelabad) on 2012-10-23
Changed in polib (Ubuntu):
status: Confirmed → Triaged
izi (izimobil) wrote :

Fixed upstream, new release 1.0.2 published.
http://pypi.python.org/pypi/polib/1.0.2

Regards.

Angel Abad (angelabad) wrote :

Hi, In Ubuntu we are in frozen, Ill upload to Debian and wait for sync.

izi, do you think this patch is than important to update Ubuntu stables, and Debian freeze distributions?

Cheers,

Changed in polib (Ubuntu):
status: Triaged → Fix Committed
izi (izimobil) wrote :

Not important IMO, empty generated comments are pretty rare...

Xangel (angel-berlanas) wrote :

Thanks for all!

Angel Abad (angelabad) wrote :

Version 1.0.2-1 uploaded to raring:

- https://launchpad.net/ubuntu/raring/+source/polib/1.0.2-1

Cheers,

Changed in polib (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers