Merge lp://staging/~gary-lasker/software-center/fix-lp1023777-for-5.2 into lp://staging/software-center/5.2
Status: | Merged |
---|---|
Merged at revision: | 3062 |
Proposed branch: | lp://staging/~gary-lasker/software-center/fix-lp1023777-for-5.2 |
Merge into: | lp://staging/software-center/5.2 |
Diff against target: |
14 lines (+3/-1) 1 file modified
softwarecenter/ui/gtk3/views/catview_gtk.py (+3/-1) |
To merge this branch: | bzr merge lp://staging/~gary-lasker/software-center/fix-lp1023777-for-5.2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Vogt (community) | Needs Fixing | ||
Review via email: mp+114699@code.staging.launchpad.net |
Commit message
* lp:~gary-lasker/software-center/fix-lp1023777-for-5.2:
- fix crash in the case where the 'click_url' attribute has not yet
been initialized at the time a banner is clicked (LP: #1023777)
Description of the change
We just received a bug report, bug 1023777, describing a crash in the new 'click_url' code. In examining the code, I can't quite see how this condition can occur, unless possibly if an exhibit banner is clicked very quickly at startup, before the call to query_exhibits returns its result. I was not able to reproduce this in testing, however.
I also don't see occurrances of this one on errors.ubuntu.com yet, but it's possible these may appear at some point.
In any case, this is a small fix that should take care of the problem in a straightforward way.
Thanks for your review!
Thanks for the branch and for noticing this bugreport. The original report was against quantal and there its exhibits( ): 'FeaturedExhibit' object has no attribute 'click_url'
easy to reproduce, the bugtitle says:
Title: software-center crashed with AttributeError in _on_show_
and indeed, the FeaturedExibit lacks this attribute, so adding it there via the approach below looks cleaner to me:
=== modified file 'softwarecenter /ui/gtk3/ widgets/ exhibits. py' ui/gtk3/ widgets/ exhibits. py 2012-07-10 03:23:44 +0000 ui/gtk3/ widgets/ exhibits. py 2012-07-13 07:13:16 +0000
' title': _("Our star apps"),
' subtitle' : _("Come and explore our favourites"),
#self. atk_name = _("Default Banner")
#self. atk_description = _("You see this banner because you have no "
--- softwarecenter/
+++ softwarecenter/
@@ -93,6 +93,7 @@
}
+ self.click_url = ""
# we should extract this automatically from the html
to test you can use trunk or 5.2 and run: CENTER_ DISTRO_ CODENAME= no-real- distro ./software-center
$ SOFTWARE_
and click on the FeaturedExhibits banner to trigger both the original bug and the fix.
As this almost caused a regression in stable I added a regression test in trunk:
lp:~mvo/software-center/fix-lp1023777
Should be easy to cherry pick this to 5.2 too.