Merge lp:~kiwinote/software-center/bug899257 into lp:software-center

Proposed by Kiwinote
Status: Merged
Merged at revision: 2619
Proposed branch: lp:~kiwinote/software-center/bug899257
Merge into: lp:software-center
Diff against target: 63 lines (+10/-4)
4 files modified
debian/changelog (+1/-0)
softwarecenter/backend/piston/scaclient_pristine.py (+6/-3)
softwarecenter/backend/scagent.py (+1/-0)
utils/piston-helpers/piston_get_scagent_available_apps.py (+2/-1)
To merge this branch: bzr merge lp:~kiwinote/software-center/bug899257
Reviewer Review Type Date Requested Status
Michael Vogt Pending
Review via email: mp+87369@code.launchpad.net
To post a comment you must log in.
2620. By Kiwinote

use the pristine scaclient instead

Revision history for this message
Kiwinote (kiwinote) wrote :

updated to use the pristine scaclient instead

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-01-03 11:31:14 +0000
3+++ debian/changelog 2012-01-03 16:08:34 +0000
4@@ -7,6 +7,7 @@
5 - ensure that hostid is always a string (as we declared) (LP: #905605)
6 * softwarecenter/ui/gtk3/widgets/thumbnail.py:
7 - fix IndexError in set_thumbnails_from_data (LP: #888669)
8+ * grab exhibits for the current series only (LP: #899257)
9
10 -- Kiwinote <kiwinote@gmail.com> Tue, 03 Jan 2012 11:26:25 +0000
11
12
13=== modified file 'softwarecenter/backend/piston/scaclient_pristine.py'
14--- softwarecenter/backend/piston/scaclient_pristine.py 2011-07-18 07:37:24 +0000
15+++ softwarecenter/backend/piston/scaclient_pristine.py 2012-01-03 16:08:34 +0000
16@@ -48,8 +48,11 @@
17 scheme=AUTHENTICATED_API_SCHEME)
18
19 @validate_pattern('lang', r'[^/]{1,9}$')
20+ @validate_pattern('series', r'[^/]{1,20}$', required=False)
21 @returns_list_of(PistonResponseObject)
22- def exhibits(self, lang):
23+ def exhibits(self, lang, series=''):
24 """Retrieve the list of currently published exhibits."""
25- return self._get(
26- 'exhibits/%s/' % (lang))
27+ url = 'exhibits/%s/' % lang
28+ if series != '':
29+ url += '%s/' % series
30+ return self._get(url)
31
32=== modified file 'softwarecenter/backend/scagent.py'
33--- softwarecenter/backend/scagent.py 2011-10-13 13:29:14 +0000
34+++ softwarecenter/backend/scagent.py 2012-01-03 16:08:34 +0000
35@@ -108,6 +108,7 @@
36 cmd = self.HELPER_CMD[:]
37 cmd.append("exhibits")
38 cmd.append(get_language())
39+ cmd.append(self.distro.get_codename())
40 spawner = SpawnHelper()
41 spawner.connect("data-available", self._on_exhibits_data_available)
42 spawner.connect("error", lambda spawner, err: self.emit("error", err))
43
44=== modified file 'utils/piston-helpers/piston_get_scagent_available_apps.py'
45--- utils/piston-helpers/piston_get_scagent_available_apps.py 2011-07-18 07:37:24 +0000
46+++ utils/piston-helpers/piston_get_scagent_available_apps.py 2012-01-03 16:08:34 +0000
47@@ -98,6 +98,7 @@
48 # exhibits
49 command = subparser.add_parser("exhibits")
50 command.add_argument("lang")
51+ command.add_argument("series")
52 command.set_defaults(command="exhibits")
53
54 args = parser.parse_args()
55@@ -170,7 +171,7 @@
56 sys.exit(1)
57 if args.command == "exhibits":
58 try:
59- piston_reply = scaclient.exhibits(lang=args.lang)
60+ piston_reply = scaclient.exhibits(lang=args.lang, series=args.series)
61 except:
62 LOG.exception("exhibits")
63 sys.exit(1)

Subscribers

People subscribed via source and target branches