Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixes to avoid stack traces due to badly formatted .po file #597

Merged
merged 2 commits into from
Jul 20, 2018

Conversation

bryntruscott
Copy link
Contributor

A couple of very small fixes to avoid stack traces due to errors in the .po file.

  1. Line 186
    If a keyword - e.g. 'msgid' appears on a line by itself, the 'len(keyword)' call used to raise an IndexError exception rather than reporting the error

  2. Line 293
    If the offending line in the .po file contains unicode characters - e.g. accents - the 'format()' call was raising a UnicodeEncodeError rather than reporting the location of the error.

@codecov-io
Copy link

codecov-io commented Jul 20, 2018

Codecov Report

Merging #597 into master will decrease coverage by 0.04%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #597      +/-   ##
==========================================
- Coverage   90.33%   90.29%   -0.05%     
==========================================
  Files          24       24              
  Lines        4120     4123       +3     
==========================================
+ Hits         3722     3723       +1     
- Misses        398      400       +2
Impacted Files Coverage Δ
babel/messages/pofile.py 96.19% <71.42%> (-0.66%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 83f959e...3f1dffb. Read the comment docs.

@akx
Copy link
Member

akx commented Jul 20, 2018

Thank you!

@akx akx merged commit a865f8e into python-babel:master Jul 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants