Merge lp:~henninge/launchpad/devel-bug-666660-poimport-oops into lp:launchpad

Proposed by Henning Eggers
Status: Merged
Approved by: Henning Eggers
Approved revision: no longer in the source branch.
Merged at revision: 11834
Proposed branch: lp:~henninge/launchpad/devel-bug-666660-poimport-oops
Merge into: lp:launchpad
Diff against target: 25 lines (+1/-3)
2 files modified
lib/lp/translations/doc/potmsgset.txt (+0/-2)
lib/lp/translations/model/potmsgset.py (+1/-1)
To merge this branch: bzr merge lp:~henninge/launchpad/devel-bug-666660-poimport-oops
Reviewer Review Type Date Requested Status
Jonathan Lange (community) Approve
Steve Kowalik (community) code* Approve
Launchpad code reviewers code Pending
Review via email: mp+39653@code.launchpad.net

Commit message

Lower log level for "Translations ... match n existing translations." to INFO to avoid it being turned into an OOPS.

Description of the change

= Bug 666660 =

This bug is about OOPSes being generated for logging messages that are not severe enough to warrant that. The code deals with the situation nicely and simply means to leave a notice for statistical purposes. There really is nothing we could do about the situation that it is reporting, anyway.

== Proposed fix ==

Lower the logging level of the message to INFO because they won't get generate OOPSes then.

== Test ==

bin/test -vvct potmsgset.txt

== QA ==

Watch the error reports for the poimport script for OOPSes as described in the bug. They should not appear any more. But this is not really QA'able because of the sporadic nature of the occurrences.

No lint.

To post a comment you must log in.
Revision history for this message
Steve Kowalik (stevenk) wrote :

This looks great!

review: Approve (code*)
Revision history for this message
Jonathan Lange (jml) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/translations/doc/potmsgset.txt'
2--- lib/lp/translations/doc/potmsgset.txt 2010-10-27 18:30:31 +0000
3+++ lib/lp/translations/doc/potmsgset.txt 2010-11-02 08:18:48 +0000
4@@ -624,8 +624,6 @@
5 >>> message_with_one_form = pm_potmsgset.updateTranslation(
6 ... pm_translation, pm_template.owner, ['%d fu'],
7 ... is_imported=False, lock_timestamp=datetime.now(pytz.UTC))
8- WARNING:...Translation for POTMsgSet ... into 'zap' matches
9- 2 existing translations.
10
11 >>> message_with_one_form == message_with_two_forms
12 True
13
14=== modified file 'lib/lp/translations/model/potmsgset.py'
15--- lib/lp/translations/model/potmsgset.py 2010-10-27 18:30:31 +0000
16+++ lib/lp/translations/model/potmsgset.py 2010-11-02 08:18:48 +0000
17@@ -557,7 +557,7 @@
18
19 if len(matches) > 0:
20 if len(matches) > 1:
21- logging.warn(
22+ logging.info(
23 "Translation for POTMsgSet %s into %s "
24 "matches %s existing translations." % sqlvalues(
25 self, pofile.language.code, len(matches)))