Merge lp:~mvo/software-center/lp921799 into lp:software-center

Proposed by Michael Vogt
Status: Merged
Merge reported by: Gary Lasker
Merged at revision: not available
Proposed branch: lp:~mvo/software-center/lp921799
Merge into: lp:software-center
Diff against target: 16 lines (+5/-1)
1 file modified
softwarecenter/db/application.py (+5/-1)
To merge this branch: bzr merge lp:~mvo/software-center/lp921799
Reviewer Review Type Date Requested Status
Gary Lasker (community) Approve
Review via email: mp+104659@code.launchpad.net

Description of the change

This branch fixes crash LP: #921799 that is pretty common according to errors.ubuntu.com

To post a comment you must log in.
Revision history for this message
Gary Lasker (gary-lasker) wrote :

This will definitely fix the crash. I wonder, do you have an idea about why we might be be getting these JSON errors? In any chase, this will take care of the crash.

Thanks mvo!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'softwarecenter/db/application.py'
--- softwarecenter/db/application.py 2012-04-30 22:27:29 +0000
+++ softwarecenter/db/application.py 2012-05-04 01:16:20 +0000
@@ -673,7 +673,11 @@
673 # ignore read errors, most likely transient673 # ignore read errors, most likely transient
674 return674 return
675 if content is not None:675 if content is not None:
676 content = json.loads(content)676 try:
677 content = json.loads(content)
678 except ValueError as e:
679 LOG.error("can not decode: '%s' (%s)" % (content, e))
680 content = None
677681
678 if isinstance(content, dict):682 if isinstance(content, dict):
679 # a list of screenshots as listsed online683 # a list of screenshots as listsed online

Subscribers

People subscribed via source and target branches