Hi Andreas, Thanks for the report!
On Mon, Sep 13, 2010 at 09:50:08AM +0200, Andreas Tille wrote: > Hi, > > the DDTP gatherer for UDD[1] produced an error in a Danish translation > which contains in line 3048: > > Description-da: : Islamic hijri date and prayer time utilities > > I fixed this in the DDTP webform and thus the problem might vanish > sooner or later but I wonder if this is another case of not robust > parsing. I'm not totally sure about RFC 822 and so I don't know what > the correct behaviour in cases like this should be but the double ':' > obviosely confuses the parser and leads to a KeyError "Key > Description-da not found". I just catched this exception in the > ddtp_gatherer code but I wonder how to solve this cleanly. > > The problem is in > > > http://ddtp.debian.net/Translation_udd/dists/squeeze/main/i18n/Translation-da.gz > (as well as in > > http://ddtp.debian.net/Translation_udd/dists/sid/main/i18n/Translation-da.gz ) > > and I think it should properly parse the Description-da key or > at least issue a warning about bogus data. It should definitely have parsed it as {'Description-da': ': Islamic hijri date and prayer time utilities'} instead of {'Description-da:': 'Islamic hijri date and prayer time utilities'} > PS: If you regard this problem as to different from the previousely > reported one I can open a new bug report. Both the apt_pkg implementation and the standard message library parse it as the first dict above, so I regard this as a bug in the native deb822 parser. Would you mind opening a new bug to track this? (I don't mind opening it if you don't get to it, but I probably won't get to it for a couple of days.) In the meantime, if you have python-apt installed, and you're using deb822.Deb822.iter_paragraphs (without a use_apt_pkg=False argument) to iterate through all of the paragraphs in the Translation file, you shouldn't hit this. -- John Wright <j...@debian.org> -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org