Merge lp:~stgraber/software-center/fix-weblive-isinstance into lp:software-center

Proposed by Stéphane Graber
Status: Merged
Merged at revision: 3204
Proposed branch: lp:~stgraber/software-center/fix-weblive-isinstance
Merge into: lp:software-center
Diff against target: 61 lines (+7/-5)
2 files modified
softwarecenter/backend/weblive_pristine.py (+5/-5)
utils/piston-helpers/x2go_helper.py (+2/-0)
To merge this branch: bzr merge lp:~stgraber/software-center/fix-weblive-isinstance
Reviewer Review Type Date Requested Status
Gary Lasker (community) Approve
Review via email: mp+126794@code.launchpad.net

Description of the change

When weblive_pristine.py was ported to be pep8 clean and python3 ready the
logic in one of the isinstance() call was reversed, preventing weblive sessions
from establishing.

I merged the changes uptream and fixed the upstream weblive.py module to work,
this branch simply re-syncs with upstream.

To post a comment you must log in.
3205. By Stéphane Graber

Change default link to adsl and set packing to adaptive-7 for lower latency.

Revision history for this message
Gary Lasker (gary-lasker) wrote :

Hi Stéphane! Thank you for finding this and for the fix. Merging now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/backend/weblive_pristine.py'
2--- softwarecenter/backend/weblive_pristine.py 2012-08-17 03:27:11 +0000
3+++ softwarecenter/backend/weblive_pristine.py 2012-09-27 21:13:24 +0000
4@@ -138,7 +138,7 @@
5 query['locale'] = locale
6 reply = self.do_query(query)
7
8- if not isinstance(reply['message'], []):
9+ if not isinstance(reply['message'], list):
10 if reply['message'] == 1:
11 raise WebLiveError("Reached user limit, return false.")
12 elif reply['message'] == 2:
13@@ -193,7 +193,7 @@
14 query['serverid'] = serverid
15 reply = self.do_query(query)
16
17- if not isinstance(reply['message'], []):
18+ if not isinstance(reply['message'], list):
19 raise WebLiveError("Invalid value, expected '%s' and got '%s'."
20 % (type({}), type(reply['message'])))
21
22@@ -207,7 +207,7 @@
23 query['action'] = 'list_package_blacklist'
24 reply = self.do_query(query)
25
26- if not isinstance(reply['message'], []):
27+ if not isinstance(reply['message'], list):
28 raise WebLiveError("Invalid value, expected '%s' and got '%s'."
29 % (type({}), type(reply['message'])))
30
31@@ -222,7 +222,7 @@
32 query['serverid'] = serverid
33 reply = self.do_query(query)
34
35- if not isinstance(reply['message'], []):
36+ if not isinstance(reply['message'], list):
37 raise WebLiveError("Invalid value, expected '%s' and got '%s'."
38 % (type({}), type(reply['message'])))
39
40@@ -236,7 +236,7 @@
41 query['action'] = 'list_servers'
42 reply = self.do_query(query)
43
44- if isinstance(reply['message'], dict):
45+ if not isinstance(reply['message'], dict):
46 raise WebLiveError("Invalid value, expected '%s' and got '%s'."
47 % (type({}), type(reply['message'])))
48
49
50=== modified file 'utils/piston-helpers/x2go_helper.py'
51--- utils/piston-helpers/x2go_helper.py 2012-03-15 10:43:13 +0000
52+++ utils/piston-helpers/x2go_helper.py 2012-09-27 21:13:24 +0000
53@@ -15,6 +15,8 @@
54 port=int(port),
55 username=login,
56 add_to_known_hosts=True,
57+ link="adsl",
58+ pack="adaptive-7",
59 cmd="weblive-session %s" % session,
60 geometry="1024x600",
61 session_type="desktop"