Merge lp:~brian-murray/aptdaemon/package-version-in-crash into lp:aptdaemon

Proposed by Brian Murray
Status: Merged
Merged at revision: 968
Proposed branch: lp:~brian-murray/aptdaemon/package-version-in-crash
Merge into: lp:aptdaemon
Diff against target: 31 lines (+9/-1)
2 files modified
aptdaemon/crash.py (+7/-1)
aptdaemon/gtk3widgets.py (+2/-0)
To merge this branch: bzr merge lp:~brian-murray/aptdaemon/package-version-in-crash
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+221507@code.launchpad.net

Description of the change

See the related bug.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

This looks good, thanks. The change in gtk3widgets is unreleated I will exclude that.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'aptdaemon/crash.py'
2--- aptdaemon/crash.py 2012-12-29 15:19:44 +0000
3+++ aptdaemon/crash.py 2014-05-30 09:30:33 +0000
4@@ -43,7 +43,13 @@
5 uid = 0
6 report = apport.Report("Crash")
7 report["Title"] = error
8- report["Package"] = "aptdaemon"
9+ package = "aptdaemon"
10+ try:
11+ package_version = apport.packaging.get_version(package)
12+ except ValueError as e:
13+ if 'does not exist' in e.message:
14+ package_version = 'unknown'
15+ report['Package'] = '%s %s' % (package, package_version)
16 report["SourcePackage"] = "aptdaemon"
17 report["Traceback"] = traceback
18 report["ExecutablePath"] = "/usr/sbin/aptd"
19
20=== modified file 'aptdaemon/gtk3widgets.py'
21--- aptdaemon/gtk3widgets.py 2013-12-03 10:16:52 +0000
22+++ aptdaemon/gtk3widgets.py 2014-05-30 09:30:33 +0000
23@@ -520,6 +520,8 @@
24 text += get_download_status_from_enum(status)
25 text += "</small>"
26 model = self.get_model()
27+ if not model:
28+ return
29 try:
30 iter = self._download_map[uri]
31 except KeyError:

Subscribers

People subscribed via source and target branches

to status/vote changes: