Merge lp:~mvo/software-center/fix-for-unusual-deb-lp1067634 into lp:software-center

Proposed by Michael Vogt
Status: Merged
Merged at revision: 3235
Proposed branch: lp:~mvo/software-center/fix-for-unusual-deb-lp1067634
Merge into: lp:software-center
Diff against target: 20 lines (+2/-2)
1 file modified
softwarecenter/db/debfile.py (+2/-2)
To merge this branch: bzr merge lp:~mvo/software-center/fix-for-unusual-deb-lp1067634
Reviewer Review Type Date Requested Status
software-store-developers Pending
Review via email: mp+130038@code.launchpad.net

Description of the change

Trivial fix for deb packages without a description field (uncommon
but possible).

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/db/debfile.py'
2--- softwarecenter/db/debfile.py 2012-07-19 09:29:16 +0000
3+++ softwarecenter/db/debfile.py 2012-10-17 07:20:39 +0000
4@@ -121,7 +121,7 @@
5 @property
6 def description(self):
7 if self._deb:
8- description = self._deb._sections["Description"]
9+ description = self._deb._sections.get("Description", "")
10 s = ('\n').join(description.split('\n')[1:]).replace(" .\n", "")
11 return utf8(s)
12 return ""
13@@ -162,7 +162,7 @@
14 @property
15 def summary(self):
16 if self._deb:
17- description = self._deb._sections["Description"]
18+ description = self._deb._sections.get("Description", "")
19 # ensure its utf8(), see #738771
20 return utf8(description.split('\n')[0])
21

Subscribers

People subscribed via source and target branches