Merge lp:~mvo/software-center/webkit-http-debug into lp:software-center

Proposed by Michael Vogt
Status: Merged
Merged at revision: 3061
Proposed branch: lp:~mvo/software-center/webkit-http-debug
Merge into: lp:software-center
Diff against target: 20 lines (+10/-0)
1 file modified
softwarecenter/ui/gtk3/views/purchaseview.py (+10/-0)
To merge this branch: bzr merge lp:~mvo/software-center/webkit-http-debug
Reviewer Review Type Date Requested Status
Gary Lasker (community) Approve
Review via email: mp+112344@code.launchpad.net

Description of the change

This branch enables full http output debugging for webkit to help diagnose e.g. ubuntu-pay issues.

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

Woohoo, this generates a lot of output! Seems very useful, thanks, mvo!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/ui/gtk3/views/purchaseview.py'
2--- softwarecenter/ui/gtk3/views/purchaseview.py 2012-05-30 18:39:55 +0000
3+++ softwarecenter/ui/gtk3/views/purchaseview.py 2012-06-27 12:33:26 +0000
4@@ -39,6 +39,16 @@
5 LOG = logging.getLogger(__name__)
6
7
8+def init_webkit_soup_debug():
9+ session = webkit.get_default_session()
10+ from gi.repository import Soup
11+ # alternatively you can use HEADERS, BODY
12+ logger = Soup.Logger.new(Soup.LoggerLogLevel.BODY, -1)
13+ logger.attach(session)
14+if "SOFTWARE_CENTER_DEBUG_WEBKIT" in os.environ:
15+ init_webkit_soup_debug()
16+
17+
18 class PurchaseView(Gtk.VBox):
19 """
20 View that displays the webkit-based UI for purchasing an item.

Subscribers

People subscribed via source and target branches