Merge lp:~ronj/apport/betterErrorBox into lp:~apport-hackers/apport/trunk

Proposed by Ronan Jouchet
Status: Merged
Approved by: Martin Pitt
Approved revision: 1761
Merged at revision: 1996
Proposed branch: lp:~ronj/apport/betterErrorBox
Merge into: lp:~apport-hackers/apport/trunk
Diff against target: 25 lines (+9/-6)
1 file modified
apport/ui.py (+9/-6)
To merge this branch: bzr merge lp:~ronj/apport/betterErrorBox
Reviewer Review Type Date Requested Status
Martin Pitt (community) Approve
Review via email: mp+23120@code.launchpad.net

This proposal supersedes a proposal from 2010-04-09.

Description of the change

I just refactored the condition, separated the two cases, and made the UnreportableReason a bit more explicit.

I'm kinda new, please check the flow is correct and ensure I didn't break anything about localization.

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

This merge request was created twice. I'll use https://code.launchpad.net/~ronj/apport/betterErrorBox/+merge/23115

Thanks!

review: Disapprove
Revision history for this message
Martin Pitt (pitti) wrote :

Whoops, the other was already marked as superseded, sorry.

This looks fine, but will be merged after Ubuntu 10.04 release (which is currently in string freeze).

Thanks!

review: Approve
Revision history for this message
Ronan Jouchet (ronj) wrote :

Great!
This is one of my first patches, the first version (1760) had missing colons.
I hope you really reviewed it in detail, I'm new to Python and while I'm happy to help, I don't want to break anything...

Revision history for this message
Martin Pitt (pitti) wrote :

Sorry, this fell off the radar. Merged into trunk now with some corrections. Thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'apport/ui.py'
--- apport/ui.py 2010-03-31 14:19:05 +0000
+++ apport/ui.py 2010-04-09 16:25:39 +0000
@@ -80,12 +80,15 @@
80 # check package origin; we do that after adding hooks, so that hooks have80 # check package origin; we do that after adding hooks, so that hooks have
81 # the chance to set a third-party CrashDB.81 # the chance to set a third-party CrashDB.
82 try:82 try:
83 if ('Package' not in report or \83 if 'CrashDB' not in report:
84 not apport.packaging.is_distro_package(report['Package'].split()[0])) \84 if 'Package' not in report:
85 and 'CrashDB' not in report:85 report['UnreportableReason'] = _('This package does not seem to be installed correctly') % \
86 #TRANS: %s is the name of the operating system86 report['DistroRelease'].split()[0]
87 report['UnreportableReason'] = _('This is not a genuine %s package') % \87 elif not apport.packaging.is_distro_package(report['Package'].split()[0]):
88 report['DistroRelease'].split()[0]88 #TRANS: %s is the name of the operating system
89 report['UnreportableReason'] = _('This package does not come from %s \
90official repositories. Please remove any PPA and try again.') % \
91 report['DistroRelease'].split()[0]
89 except ValueError:92 except ValueError:
90 # this happens if we are collecting information on an uninstalled93 # this happens if we are collecting information on an uninstalled
91 # package94 # package

Subscribers

People subscribed via source and target branches