Merge lp:~mvo/software-center/raring-pep8 into lp:software-center

Proposed by Michael Vogt
Status: Merged
Merged at revision: 3256
Proposed branch: lp:~mvo/software-center/raring-pep8
Merge into: lp:software-center
Diff against target: 2474 lines (+476/-459)
64 files modified
softwarecenter/backend/channel.py (+5/-4)
softwarecenter/backend/installbackend_impl/aptd.py (+14/-12)
softwarecenter/backend/installbackend_impl/packagekitd.py (+22/-22)
softwarecenter/backend/login.py (+5/-5)
softwarecenter/backend/login_impl/login_fake.py (+15/-14)
softwarecenter/backend/login_impl/login_sso.py (+2/-2)
softwarecenter/backend/oneconfhandler/core.py (+3/-3)
softwarecenter/backend/piston/rnrclient_fake.py (+8/-8)
softwarecenter/backend/piston/rnrclient_pristine.py (+4/-4)
softwarecenter/backend/piston/sreclient_pristine.py (+3/-3)
softwarecenter/backend/recagent.py (+11/-11)
softwarecenter/backend/reviews/rnr.py (+19/-14)
softwarecenter/backend/scagent.py (+5/-5)
softwarecenter/backend/spawn_helper.py (+2/-2)
softwarecenter/backend/transactionswatcher.py (+1/-1)
softwarecenter/backend/ubuntusso.py (+7/-6)
softwarecenter/cmdfinder.py (+1/-1)
softwarecenter/config.py (+3/-3)
softwarecenter/db/application.py (+1/-1)
softwarecenter/db/categories.py (+72/-72)
softwarecenter/db/database.py (+1/-1)
softwarecenter/db/dataprovider.py (+2/-2)
softwarecenter/db/pkginfo.py (+15/-14)
softwarecenter/db/pkginfo_impl/packagekit.py (+13/-10)
softwarecenter/db/update.py (+2/-2)
softwarecenter/distro/__init__.py (+11/-10)
softwarecenter/distro/debian.py (+15/-14)
softwarecenter/distro/fedora.py (+5/-5)
softwarecenter/distro/suselinux.py (+6/-6)
softwarecenter/distro/ubuntu.py (+29/-29)
softwarecenter/enums.py (+11/-12)
softwarecenter/gwibber_helper.py (+6/-7)
softwarecenter/hw.py (+12/-12)
softwarecenter/log.py (+2/-2)
softwarecenter/netstatus.py (+4/-5)
softwarecenter/paths.py (+2/-2)
softwarecenter/plugin.py (+4/-4)
softwarecenter/region.py (+1/-1)
softwarecenter/sso/gui.py (+13/-13)
softwarecenter/sso/tests/__init__.py (+4/-3)
softwarecenter/ui/gtk3/app.py (+4/-4)
softwarecenter/ui/gtk3/models/appstore2.py (+13/-10)
softwarecenter/ui/gtk3/panes/availablepane.py (+1/-1)
softwarecenter/ui/gtk3/panes/historypane.py (+2/-2)
softwarecenter/ui/gtk3/panes/softwarepane.py (+1/-1)
softwarecenter/ui/gtk3/review_gui_helper.py (+10/-9)
softwarecenter/ui/gtk3/session/appmanager.py (+3/-3)
softwarecenter/ui/gtk3/session/displaystate.py (+1/-1)
softwarecenter/ui/gtk3/session/viewmanager.py (+1/-1)
softwarecenter/ui/gtk3/views/appdetailsview.py (+1/-1)
softwarecenter/ui/gtk3/views/appview.py (+4/-3)
softwarecenter/ui/gtk3/views/catview.py (+10/-9)
softwarecenter/ui/gtk3/views/purchaseview.py (+15/-15)
softwarecenter/ui/gtk3/widgets/buttons.py (+1/-1)
softwarecenter/ui/gtk3/widgets/containers.py (+2/-2)
softwarecenter/ui/gtk3/widgets/exhibits.py (+4/-4)
softwarecenter/ui/gtk3/widgets/imagedialog.py (+1/-1)
softwarecenter/ui/gtk3/widgets/labels.py (+1/-1)
softwarecenter/ui/gtk3/widgets/oneconfviews.py (+2/-2)
softwarecenter/ui/gtk3/widgets/recommendations.py (+8/-8)
softwarecenter/ui/gtk3/widgets/reviews.py (+10/-13)
softwarecenter/ui/gtk3/widgets/stars.py (+1/-1)
softwarecenter/utils.py (+18/-18)
tests/test_pep8.py (+1/-1)
To merge this branch: bzr merge lp:~mvo/software-center/raring-pep8
Reviewer Review Type Date Requested Status
software-store-developers Pending
Review via email: mp+136729@code.launchpad.net

Description of the change

start fixing the latest pep8 issues (thanks pep8 1.3 :/)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/backend/channel.py'
2--- softwarecenter/backend/channel.py 2012-06-08 22:25:08 +0000
3+++ softwarecenter/backend/channel.py 2012-11-28 17:42:20 +0000
4@@ -24,10 +24,11 @@
5
6 import softwarecenter.distro
7
8-from softwarecenter.enums import (SortMethods,
9- Icons,
10- ViewPages,
11- )
12+from softwarecenter.enums import (
13+ SortMethods,
14+ Icons,
15+ ViewPages,
16+)
17
18 LOG = logging.getLogger(__name__)
19
20
21=== modified file 'softwarecenter/backend/installbackend_impl/aptd.py'
22--- softwarecenter/backend/installbackend_impl/aptd.py 2012-11-23 22:57:21 +0000
23+++ softwarecenter/backend/installbackend_impl/aptd.py 2012-11-28 17:42:20 +0000
24@@ -26,19 +26,20 @@
25 from subprocess import (
26 Popen,
27 PIPE,
28- )
29+)
30
31 from gi.repository import GObject
32
33-from softwarecenter.utils import (sources_filename_from_ppa_entry,
34- release_filename_in_lists_from_deb_line,
35- obfuscate_private_ppa_details,
36- utf8,
37- )
38+from softwarecenter.utils import (
39+ sources_filename_from_ppa_entry,
40+ release_filename_in_lists_from_deb_line,
41+ obfuscate_private_ppa_details,
42+ utf8,
43+)
44 from softwarecenter.enums import (
45 TransactionTypes,
46 PURCHASE_TRANSACTION_ID,
47- )
48+)
49 from softwarecenter.paths import APPORT_RECOVERABLE_ERROR
50
51 from aptdaemon import client
52@@ -54,7 +55,8 @@
53 BaseTransactionsWatcher,
54 BaseTransaction,
55 TransactionFinishedResult,
56- TransactionProgress)
57+ TransactionProgress,
58+)
59 from softwarecenter.backend.installbackend import InstallBackend
60
61 from gettext import gettext as _
62@@ -823,10 +825,10 @@
63 cleaned_error_details = obfuscate_private_ppa_details(
64 trans.error_details)
65 msg = utf8("%s: %s\n%s\n\n%s") % (
66- utf8(_("Error")),
67- utf8(enums.get_error_string_from_enum(trans.error_code)),
68- utf8(enums.get_error_description_from_enum(trans.error_code)),
69- utf8(cleaned_error_details))
70+ utf8(_("Error")),
71+ utf8(enums.get_error_string_from_enum(trans.error_code)),
72+ utf8(enums.get_error_description_from_enum(trans.error_code)),
73+ utf8(cleaned_error_details))
74 self._logger.error("error in _on_trans_finished '%s'" % msg)
75 # show dialog to the user and exit (no need to reopen the cache)
76 if not trans.error_code:
77
78=== modified file 'softwarecenter/backend/installbackend_impl/packagekitd.py'
79--- softwarecenter/backend/installbackend_impl/packagekitd.py 2012-11-23 22:57:21 +0000
80+++ softwarecenter/backend/installbackend_impl/packagekitd.py 2012-11-28 17:42:20 +0000
81@@ -230,12 +230,11 @@
82
83 def remove(self, app, iconname, addons_install=[],
84 addons_remove=[], metadata=None):
85- self.remove_multiple((app,), (iconname,),
86- addons_install, addons_remove, metadata
87- )
88+ self.remove_multiple(
89+ (app,), (iconname,), addons_install, addons_remove, metadata)
90
91 def remove_multiple(self, apps, iconnames,
92- addons_install=[], addons_remove=[], metadatas=None):
93+ addons_install=[], addons_remove=[], metadatas=None):
94
95 pkgnames = [app.pkgname for app in apps]
96 appnames = [app.appname for app in apps]
97@@ -248,14 +247,15 @@
98 # temporary hack
99 pkgnames = self._fix_pkgnames(pkgnames)
100
101- self.client.remove_packages_async(pkgnames,
102- False, # allow deps
103- False, # autoremove
104- None, # cancellable
105- self._on_progress_changed,
106- None, # progress data
107- self._on_remove_ready, # callback ready
108- None # callback data
109+ self.client.remove_packages_async(
110+ pkgnames,
111+ False, # allow deps
112+ False, # autoremove
113+ None, # cancellable
114+ self._on_progress_changed,
115+ None, # progress data
116+ self._on_remove_ready, # callback ready
117+ None # callback data
118 )
119 self.emit("transaction-started", pkgnames[0], appnames[0], 0,
120 TransactionTypes.REMOVE)
121@@ -265,9 +265,8 @@
122 if filename is not None:
123 LOG.error("Filename not implemented") # FIXME
124 else:
125- self.install_multiple((app,), (iconname,),
126- addons_install, addons_remove, metadata
127- )
128+ self.install_multiple(
129+ (app,), (iconname,), addons_install, addons_remove, metadata)
130
131 def install_multiple(self, apps, iconnames,
132 addons_install=[], addons_remove=[], metadatas=None):
133@@ -289,13 +288,14 @@
134 # PackageKit from installing untrusted packages
135 # (in general, all enabled repos should have GPG signatures,
136 # which is enough for being marked "trusted", but still)
137- self.client.install_packages_async(True, # only trusted
138- pkgnames,
139- None, # cancellable
140- self._on_progress_changed,
141- None, # progress data
142- self._on_install_ready, # GAsyncReadyCallback
143- None # ready data
144+ self.client.install_packages_async(
145+ True, # only trusted
146+ pkgnames,
147+ None, # cancellable
148+ self._on_progress_changed,
149+ None, # progress data
150+ self._on_install_ready, # GAsyncReadyCallback
151+ None # ready data
152 )
153 self.emit("transaction-started", pkgnames[0], appnames[0], 0,
154 TransactionTypes.INSTALL)
155
156=== modified file 'softwarecenter/backend/login.py'
157--- softwarecenter/backend/login.py 2012-11-23 22:57:21 +0000
158+++ softwarecenter/backend/login.py 2012-11-28 17:42:20 +0000
159@@ -36,20 +36,20 @@
160 "login-successful": (GObject.SIGNAL_RUN_LAST,
161 GObject.TYPE_NONE,
162 (GObject.TYPE_PYOBJECT,),
163- ),
164+ ),
165 "login-failed": (GObject.SIGNAL_RUN_LAST,
166 GObject.TYPE_NONE,
167 (),
168- ),
169+ ),
170 "login-canceled": (GObject.SIGNAL_RUN_LAST,
171 GObject.TYPE_NONE,
172 (),
173- ),
174+ ),
175 "need-username-password": (GObject.SIGNAL_RUN_LAST,
176 GObject.TYPE_NONE,
177 (),
178- ),
179- }
180+ ),
181+ }
182
183 def login(self):
184 raise NotImplemented
185
186=== modified file 'softwarecenter/backend/login_impl/login_fake.py'
187--- softwarecenter/backend/login_impl/login_fake.py 2012-09-14 14:00:43 +0000
188+++ softwarecenter/backend/login_impl/login_fake.py 2012-11-28 17:42:20 +0000
189@@ -27,7 +27,7 @@
190 from softwarecenter.backend.fake_review_settings import (
191 FakeReviewSettings,
192 network_delay,
193- )
194+)
195 from softwarecenter.backend.login import LoginBackend
196
197 LOG = logging.getLogger(__name__)
198@@ -69,17 +69,18 @@
199 def _return_credentials(self):
200 c = dbus.Dictionary(
201 {
202- dbus.String(u'consumer_secret'): dbus.String(
203- self._random_unicode_string(30)),
204- dbus.String(u'token'): dbus.String(
205- self._random_unicode_string(50)),
206- dbus.String(u'consumer_key'): dbus.String(
207- self._random_unicode_string(7)),
208- dbus.String(u'name'): dbus.String('Ubuntu Software Center @ ' +
209- self._random_unicode_string(6)),
210- dbus.String(u'token_secret'): dbus.String(
211- self._random_unicode_string(50))
212- },
213- signature=dbus.Signature('ss')
214- )
215+ dbus.String(u'consumer_secret'): dbus.String(
216+ self._random_unicode_string(30)),
217+ dbus.String(u'token'): dbus.String(
218+ self._random_unicode_string(50)),
219+ dbus.String(u'consumer_key'): dbus.String(
220+ self._random_unicode_string(7)),
221+ dbus.String(u'name'): dbus.String(
222+ 'Ubuntu Software Center @ ' +
223+ self._random_unicode_string(6)),
224+ dbus.String(u'token_secret'): dbus.String(
225+ self._random_unicode_string(50))
226+ },
227+ signature=dbus.Signature('ss')
228+ )
229 return c
230
231=== modified file 'softwarecenter/backend/login_impl/login_sso.py'
232--- softwarecenter/backend/login_impl/login_sso.py 2012-11-23 22:57:21 +0000
233+++ softwarecenter/backend/login_impl/login_sso.py 2012-11-28 17:42:20 +0000
234@@ -29,7 +29,7 @@
235 DBUS_BUS_NAME,
236 DBUS_CREDENTIALS_IFACE,
237 DBUS_CREDENTIALS_PATH,
238- )
239+)
240
241 from softwarecenter.backend.login import LoginBackend
242 from softwarecenter.utils import utf8
243@@ -62,7 +62,7 @@
244
245 def _get_params(self):
246 p = {'ui_executable': 'software-center-sso-gtk',
247- }
248+ }
249 if self.help_text:
250 p['help_text'] = utf8(self.help_text)
251 if self._window_id:
252
253=== modified file 'softwarecenter/backend/oneconfhandler/core.py'
254--- softwarecenter/backend/oneconfhandler/core.py 2012-09-14 13:25:45 +0000
255+++ softwarecenter/backend/oneconfhandler/core.py 2012-11-28 17:42:20 +0000
256@@ -39,12 +39,12 @@
257 "show-oneconf-changed": (GObject.SIGNAL_RUN_LAST,
258 GObject.TYPE_NONE,
259 (GObject.TYPE_PYOBJECT,),
260- ),
261+ ),
262 "last-time-sync-changed": (GObject.SIGNAL_RUN_LAST,
263 GObject.TYPE_NONE,
264 (GObject.TYPE_PYOBJECT,),
265- ),
266- }
267+ ),
268+ }
269
270 def __init__(self, oneconfviewpickler):
271 '''Controller of the installed pane'''
272
273=== modified file 'softwarecenter/backend/piston/rnrclient_fake.py'
274--- softwarecenter/backend/piston/rnrclient_fake.py 2012-11-23 22:57:21 +0000
275+++ softwarecenter/backend/piston/rnrclient_fake.py 2012-11-28 17:42:20 +0000
276@@ -7,7 +7,7 @@
277 returns,
278 returns_json,
279 returns_list_of,
280- )
281+)
282 from piston_mini_client.validators import validate_pattern, validate
283 from piston_mini_client.failhandlers import APIError
284
285@@ -81,7 +81,7 @@
286 'ratings_total': str(random.randrange(1, 200)),
287 'ratings_average': str(random.randrange(0, 5)),
288 'histogram': None
289- }
290+ }
291 stats.append(s)
292
293 return json.dumps(stats)
294@@ -151,7 +151,7 @@
295 "reviewer_displayname": "Fake User",
296 "package_name": review.package_name,
297 "distroseries": review.distroseries
298- }
299+ }
300 return json.dumps(r)
301
302 @validate('review_id', int)
303@@ -224,7 +224,7 @@
304 'username': response_user,
305 'useful': random.choice(['True', 'False']),
306 'review_id': review_id
307- }
308+ }
309 return json.dumps([response])
310
311 #set up review ids to honour requested and also add randoms
312@@ -248,10 +248,10 @@
313 id = random.randint(rand_id_start, 10000)
314
315 u = {
316- 'username': username,
317- 'useful': random.choice(['True', 'False']),
318- 'review_id': id
319- }
320+ 'username': username,
321+ 'useful': random.choice(['True', 'False']),
322+ 'review_id': id
323+ }
324 votes.append(u)
325
326 return json.dumps(votes)
327
328=== modified file 'softwarecenter/backend/piston/rnrclient_pristine.py'
329--- softwarecenter/backend/piston/rnrclient_pristine.py 2012-08-17 09:31:48 +0000
330+++ softwarecenter/backend/piston/rnrclient_pristine.py 2012-11-28 17:42:20 +0000
331@@ -10,7 +10,7 @@
332 returns,
333 returns_json,
334 returns_list_of,
335- )
336+)
337 from piston_mini_client.validators import validate_pattern, validate
338
339 # These are factored out as constants for if you need to work against a
340@@ -139,10 +139,10 @@
341 def flag_review(self, review_id, reason, text):
342 """Flag a review as being inappropriate"""
343 data = {'reason': reason,
344- 'text': text,
345- }
346+ 'text': text,
347+ }
348 return self._post('reviews/%s/flags/' % review_id, data=data,
349- scheme=AUTHENTICATED_API_SCHEME)
350+ scheme=AUTHENTICATED_API_SCHEME)
351
352 @validate('review_id', int)
353 @validate_pattern('useful', 'True|False')
354
355=== modified file 'softwarecenter/backend/piston/sreclient_pristine.py'
356--- softwarecenter/backend/piston/sreclient_pristine.py 2012-08-28 18:22:00 +0000
357+++ softwarecenter/backend/piston/sreclient_pristine.py 2012-11-28 17:42:20 +0000
358@@ -4,7 +4,7 @@
359 validate_integer,
360 validate_pattern,
361 oauth_protected,
362- )
363+)
364
365 # These are factored out as constants for if you need to work against a
366 # server that doesn't support both schemes (like http-only dev servers)
367@@ -79,7 +79,7 @@
368 data = {
369 'feedback': feedback,
370 'rid': rid,
371- }
372+ }
373 return self._post('feedback/', data=data,
374 scheme=AUTHENTICATED_API_SCHEME)
375
376@@ -102,6 +102,6 @@
377 data = {
378 'app': appname,
379 'remove': remove,
380- }
381+ }
382 return self._post('remove_app/', data=data,
383 scheme=AUTHENTICATED_API_SCHEME)
384
385=== modified file 'softwarecenter/backend/recagent.py'
386--- softwarecenter/backend/recagent.py 2012-11-23 22:57:21 +0000
387+++ softwarecenter/backend/recagent.py 2012-11-28 17:42:20 +0000
388@@ -39,44 +39,44 @@
389 "server-status": (GObject.SIGNAL_RUN_LAST,
390 GObject.TYPE_NONE,
391 (GObject.TYPE_PYOBJECT,),
392- ),
393+ ),
394 "profile": (GObject.SIGNAL_RUN_LAST,
395 GObject.TYPE_NONE,
396 (GObject.TYPE_PYOBJECT,),
397- ),
398+ ),
399 "submit-profile-finished": (GObject.SIGNAL_RUN_LAST,
400 GObject.TYPE_NONE,
401 (GObject.TYPE_PYOBJECT,),
402- ),
403+ ),
404 "submit-anon-profile-finished": (GObject.SIGNAL_RUN_LAST,
405 GObject.TYPE_NONE,
406 (GObject.TYPE_PYOBJECT,),
407- ),
408+ ),
409 "recommend-me": (GObject.SIGNAL_RUN_LAST,
410 GObject.TYPE_NONE,
411 (GObject.TYPE_PYOBJECT,),
412- ),
413+ ),
414 "recommend-app": (GObject.SIGNAL_RUN_LAST,
415 GObject.TYPE_NONE,
416 (GObject.TYPE_PYOBJECT,),
417- ),
418+ ),
419 "recommend-all-apps": (GObject.SIGNAL_RUN_LAST,
420 GObject.TYPE_NONE,
421 (GObject.TYPE_PYOBJECT,),
422- ),
423+ ),
424 "recommend-top": (GObject.SIGNAL_RUN_LAST,
425 GObject.TYPE_NONE,
426 (GObject.TYPE_PYOBJECT,),
427- ),
428+ ),
429 "submit-implicit-feedback-finished": (GObject.SIGNAL_RUN_LAST,
430 GObject.TYPE_NONE,
431 (GObject.TYPE_PYOBJECT,),
432- ),
433+ ),
434 "error": (GObject.SIGNAL_RUN_LAST,
435 GObject.TYPE_NONE,
436 (str,),
437- ),
438- }
439+ ),
440+ }
441
442 def __init__(self, xid=None):
443 GObject.GObject.__init__(self)
444
445=== modified file 'softwarecenter/backend/reviews/rnr.py'
446--- softwarecenter/backend/reviews/rnr.py 2012-11-23 22:57:21 +0000
447+++ softwarecenter/backend/reviews/rnr.py 2012-11-28 17:42:20 +0000
448@@ -25,21 +25,26 @@
449
450 from softwarecenter.backend.spawn_helper import SpawnHelper
451 from softwarecenter.backend.reviews import (
452- ReviewLoader,
453- Review,
454- ReviewStats,
455- UsefulnessCache,
456- )
457+ ReviewLoader,
458+ Review,
459+ ReviewStats,
460+ UsefulnessCache,
461+)
462 from softwarecenter.backend.piston.rnrclient import RatingsAndReviewsAPI
463 from softwarecenter.backend.piston.rnrclient_pristine import ReviewDetails
464 from softwarecenter.db.database import Application
465 import softwarecenter.distro
466 from softwarecenter.netstatus import network_state_is_connected
467-from softwarecenter.paths import (SOFTWARE_CENTER_CACHE_DIR,
468- PistonHelpers,
469- RNRApps,
470- )
471-from softwarecenter.utils import calc_dr, utf8, save_person_to_config
472+from softwarecenter.paths import (
473+ SOFTWARE_CENTER_CACHE_DIR,
474+ PistonHelpers,
475+ RNRApps,
476+)
477+from softwarecenter.utils import (
478+ calc_dr,
479+ utf8,
480+ save_person_to_config,
481+)
482
483
484 LOG = logging.getLogger(__name__)
485@@ -112,7 +117,7 @@
486 "--pkgname", str(app.pkgname), # ensure its str, not unicode
487 "--page", str(page),
488 "--sort", sort_method,
489- ]
490+ ]
491 spawn_helper = SpawnHelper()
492 spawn_helper.connect(
493 "data-available", self._on_reviews_helper_data, app)
494@@ -242,7 +247,7 @@
495 "--review-id", review_id,
496 "--parent-xid", "%s" % parent_xid,
497 "--datadir", datadir,
498- ]
499+ ]
500 spawn_helper = SpawnHelper("json")
501 spawn_helper.connect("exited",
502 self._on_report_abuse_finished,
503@@ -268,7 +273,7 @@
504 "--is-useful", "%s" % int(is_useful),
505 "--parent-xid", "%s" % parent_xid,
506 "--datadir", datadir,
507- ]
508+ ]
509 spawn_helper = SpawnHelper(format="none")
510 spawn_helper.connect("exited",
511 self._on_submit_usefulness_finished,
512@@ -320,7 +325,7 @@
513 "--review-id", "%s" % review_id,
514 "--parent-xid", "%s" % parent_xid,
515 "--datadir", datadir,
516- ]
517+ ]
518 spawn_helper = SpawnHelper(format="none")
519 spawn_helper.connect("exited",
520 self._on_delete_review_finished,
521
522=== modified file 'softwarecenter/backend/scagent.py'
523--- softwarecenter/backend/scagent.py 2012-11-23 22:57:21 +0000
524+++ softwarecenter/backend/scagent.py 2012-11-28 17:42:20 +0000
525@@ -36,20 +36,20 @@
526 "available-for-me": (GObject.SIGNAL_RUN_LAST,
527 GObject.TYPE_NONE,
528 (GObject.TYPE_PYOBJECT,),
529- ),
530+ ),
531 "available": (GObject.SIGNAL_RUN_LAST,
532 GObject.TYPE_NONE,
533 (GObject.TYPE_PYOBJECT,),
534- ),
535+ ),
536 "exhibits": (GObject.SIGNAL_RUN_LAST,
537 GObject.TYPE_NONE,
538 (GObject.TYPE_PYOBJECT,),
539- ),
540+ ),
541 "error": (GObject.SIGNAL_RUN_LAST,
542 GObject.TYPE_NONE,
543 (str,),
544- ),
545- }
546+ ),
547+ }
548
549 def __init__(self, ignore_cache=False, xid=None):
550 GObject.GObject.__init__(self)
551
552=== modified file 'softwarecenter/backend/spawn_helper.py'
553--- softwarecenter/backend/spawn_helper.py 2012-11-23 22:57:21 +0000
554+++ softwarecenter/backend/spawn_helper.py 2012-11-28 17:42:20 +0000
555@@ -52,8 +52,8 @@
556 "error": (GObject.SIGNAL_RUN_LAST,
557 GObject.TYPE_NONE,
558 (str,),
559- ),
560- }
561+ ),
562+ }
563
564 def __init__(self, format="pickle"):
565 super(SpawnHelper, self).__init__()
566
567=== modified file 'softwarecenter/backend/transactionswatcher.py'
568--- softwarecenter/backend/transactionswatcher.py 2012-03-19 13:35:47 +0000
569+++ softwarecenter/backend/transactionswatcher.py 2012-11-28 17:42:20 +0000
570@@ -41,7 +41,7 @@
571 'deleted': (GObject.SIGNAL_RUN_FIRST,
572 GObject.TYPE_NONE,
573 []),
574- }
575+ }
576
577 @property
578 def tid(self):
579
580=== modified file 'softwarecenter/backend/ubuntusso.py'
581--- softwarecenter/backend/ubuntusso.py 2012-11-23 22:57:21 +0000
582+++ softwarecenter/backend/ubuntusso.py 2012-11-28 17:42:20 +0000
583@@ -40,15 +40,16 @@
584
585 from softwarecenter.backend.piston.ubuntusso_pristine import (
586 UbuntuSsoAPI as PristineUbuntuSsoAPI,
587- )
588+)
589 # patch default_service_root to the one we use
590 from softwarecenter.enums import UBUNTU_SSO_SERVICE
591 # *Don't* append /api/1.0, as it's already included in UBUNTU_SSO_SERVICE
592 PristineUbuntuSsoAPI.default_service_root = UBUNTU_SSO_SERVICE
593
594-from softwarecenter.enums import (SOFTWARE_CENTER_NAME_KEYRING,
595- SOFTWARE_CENTER_SSO_DESCRIPTION,
596- )
597+from softwarecenter.enums import (
598+ SOFTWARE_CENTER_NAME_KEYRING,
599+ SOFTWARE_CENTER_SSO_DESCRIPTION,
600+)
601 from softwarecenter.utils import clear_token_from_ubuntu_sso_sync
602
603 LOG = logging.getLogger(__name__)
604@@ -69,7 +70,7 @@
605 GObject.TYPE_NONE,
606 (GObject.TYPE_PYOBJECT,),
607 ),
608- }
609+ }
610
611 def __init__(self, xid=0):
612 GObject.GObject.__init__(self)
613@@ -192,7 +193,7 @@
614 u'unverified_emails': [],
615 u'verified_emails': [],
616 u'openid_identifier': u'fnerkWt'
617- }
618+ }
619 return response
620
621 def _make_error():
622
623=== modified file 'softwarecenter/cmdfinder.py'
624--- softwarecenter/cmdfinder.py 2012-11-23 22:57:21 +0000
625+++ softwarecenter/cmdfinder.py 2012-11-28 17:42:20 +0000
626@@ -36,7 +36,7 @@
627 "/sbin",
628 "/bin",
629 "/usr/games",
630- ]
631+ ]
632
633 def __init__(self, cache):
634 self._cache = cache
635
636=== modified file 'softwarecenter/config.py'
637--- softwarecenter/config.py 2012-11-23 22:57:21 +0000
638+++ softwarecenter/config.py 2012-11-28 17:42:20 +0000
639@@ -158,9 +158,9 @@
640 def _app_window_size_set(self, size_tuple):
641 size_as_string = "%s, %s" % (size_tuple[0], size_tuple[1])
642 self._generic_set("size", size_as_string)
643- app_window_size = property(_app_window_size_get, _app_window_size_set,
644- None,
645- "Defines the size of the application window as a tuple (x,y)")
646+ app_window_size = property(
647+ _app_window_size_get, _app_window_size_set,
648+ None, "Defines the size of the application window as a tuple (x,y)")
649
650
651 # one global instance of the config
652
653=== modified file 'softwarecenter/db/application.py'
654--- softwarecenter/db/application.py 2012-11-23 22:57:21 +0000
655+++ softwarecenter/db/application.py 2012-11-28 17:42:20 +0000
656@@ -169,7 +169,7 @@
657 __gsignals__ = {"screenshots-available": (GObject.SIGNAL_RUN_FIRST,
658 GObject.TYPE_NONE,
659 (GObject.TYPE_PYOBJECT,),
660- ),
661+ ),
662 }
663
664 def __init__(self, db, doc=None, application=None):
665
666=== modified file 'softwarecenter/db/categories.py'
667--- softwarecenter/db/categories.py 2012-11-23 22:57:21 +0000
668+++ softwarecenter/db/categories.py 2012-11-28 17:42:20 +0000
669@@ -143,12 +143,12 @@
670 "needs-refresh": (GObject.SIGNAL_RUN_LAST,
671 GObject.TYPE_NONE,
672 (),
673- ),
674+ ),
675 "recommender-agent-error": (GObject.SIGNAL_RUN_LAST,
676 GObject.TYPE_NONE,
677 (GObject.TYPE_STRING,),
678- ),
679- }
680+ ),
681+ }
682
683 def __init__(self, db, subcategory=None):
684 self.db = db
685@@ -156,9 +156,9 @@
686 if subcategory:
687 # this is the set of recommendations for a given subcategory
688 cat_title = u"Recommended For You in %s" % (
689- subcategory.untranslated_name)
690+ subcategory.untranslated_name)
691 tr_title = utf8(_("Recommended For You in %s")) % utf8(
692- subcategory.name)
693+ subcategory.name)
694 else:
695 # this is the full set of recommendations for e.g. the lobby view
696 cat_title = u"Recommended For You"
697@@ -201,21 +201,21 @@
698 "needs-refresh": (GObject.SIGNAL_RUN_LAST,
699 GObject.TYPE_NONE,
700 (),
701- ),
702+ ),
703 "recommender-agent-error": (GObject.SIGNAL_RUN_LAST,
704 GObject.TYPE_NONE,
705 (GObject.TYPE_STRING,),
706- ),
707- }
708+ ),
709+ }
710
711 def __init__(self, db, pkgname):
712 super(AppRecommendationsCategory, self).__init__(
713- u"People Also Installed",
714- _(u"People Also Installed"),
715- None,
716- xapian.Query(),
717- flags=['available-only', 'not-installed-only'],
718- item_limit=4)
719+ u"People Also Installed",
720+ _(u"People Also Installed"),
721+ None,
722+ xapian.Query(),
723+ flags=['available-only', 'not-installed-only'],
724+ item_limit=4)
725 self.db = db
726 self.recommender_agent = RecommenderAgent()
727 self.recommender_agent.connect(
728@@ -525,65 +525,65 @@
729 # static category mapping for the tiles
730
731 category_cat = {
732-'Utility': 'Accessories',
733-'System': 'Accessories',
734-'Education': 'Education',
735-'Game': 'Games',
736-'Sports': 'Games',
737-'Graphics': 'Graphics',
738-'Network': 'Internet',
739-'Office': 'Office',
740-'Science': 'Science & Engineering',
741-'Audio': 'Sound & Video',
742-'AudioVideo': 'Sound & Video',
743-'Video': 'Sound & Video',
744-'Settings': 'Themes & Tweaks',
745-'Accessibility': 'Universal Access',
746-'Development': 'Developer Tools',
747-'X-Publishing': 'Books & Magazines',
748+ 'Utility': 'Accessories',
749+ 'System': 'Accessories',
750+ 'Education': 'Education',
751+ 'Game': 'Games',
752+ 'Sports': 'Games',
753+ 'Graphics': 'Graphics',
754+ 'Network': 'Internet',
755+ 'Office': 'Office',
756+ 'Science': 'Science & Engineering',
757+ 'Audio': 'Sound & Video',
758+ 'AudioVideo': 'Sound & Video',
759+ 'Video': 'Sound & Video',
760+ 'Settings': 'Themes & Tweaks',
761+ 'Accessibility': 'Universal Access',
762+ 'Development': 'Developer Tools',
763+ 'X-Publishing': 'Books & Magazines',
764 }
765
766 category_subcat = {
767-'BoardGame': 'Games;Board Games',
768-'CardGame': 'Games;Card Games',
769-'LogicGame': 'Games;Puzzles',
770-'RolePlaying': 'Games;Role Playing',
771-'SportsGame': 'Games;Sports',
772-'3DGraphics': 'Graphics;3D Graphics',
773-'VectorGraphics': 'Graphics;Drawing',
774-'RasterGraphics': 'Graphics;Painting & Editing',
775-'Photography': 'Graphics;Photography',
776-'Publishing': 'Graphics;Publishing',
777-'Scanning': 'Graphics;Scanning & OCR',
778-'OCR': 'Graphics;Scanning & OCR',
779-'Viewer': 'Graphics;Viewers',
780-'InstantMessaging': 'Internet;Chat',
781-'IRCClient': 'Internet;Chat',
782-'FileTransfer': 'Internet;File Sharing',
783-'Email': 'Internet;Mail',
784-'WebBrowser': 'Internet;Web Browsers',
785-'Astronomy': 'Science & Engineering;Astronomy',
786-'Biology': 'Science & Engineering;Biology',
787-'Chemistry': 'Science & Engineering;Chemistry',
788-'ArtificialIntelligence': 'Science & Engineering;Computing & Robotics',
789-'ComputerScience': 'Science & Engineering;Computing & Robotics',
790-'Robotics': 'Science & Engineering;Computing & Robotics',
791-'Electronics': 'Science & Engineering;Electronics',
792-'Engineering': 'Science & Engineering;Engineering',
793-'Geography': 'Science & Engineering;Geography',
794-'Geology': 'Science & Engineering;Geology',
795-'Geoscience': 'Science & Engineering;Geology',
796-'DataVisualization': 'Science & Engineering;Mathematics',
797-'Math': 'Science & Engineering;Mathematics',
798-'NumericalAnalysis': 'Science & Engineering;Mathematics',
799-'MedicalSoftware': 'Science & Engineering;Medicine',
800-'Electricity': 'Science & Engineering;Physics',
801-'Physics': 'Science & Engineering;Physics',
802-'Debugger': 'Developer Tools;Debugging',
803-'GUIDesigner': 'Developer Tools;Graphic Interface Design',
804-'IDE': 'Developer Tools;IDEs',
805-'Translation': 'Developer Tools;Localization',
806-'Profiling': 'Developer Tools;Profiling',
807-'RevisionControl': 'Developer Tools;Version Control',
808-'WebDevelopment': 'Developer Tools;Web Development',
809+ 'BoardGame': 'Games;Board Games',
810+ 'CardGame': 'Games;Card Games',
811+ 'LogicGame': 'Games;Puzzles',
812+ 'RolePlaying': 'Games;Role Playing',
813+ 'SportsGame': 'Games;Sports',
814+ '3DGraphics': 'Graphics;3D Graphics',
815+ 'VectorGraphics': 'Graphics;Drawing',
816+ 'RasterGraphics': 'Graphics;Painting & Editing',
817+ 'Photography': 'Graphics;Photography',
818+ 'Publishing': 'Graphics;Publishing',
819+ 'Scanning': 'Graphics;Scanning & OCR',
820+ 'OCR': 'Graphics;Scanning & OCR',
821+ 'Viewer': 'Graphics;Viewers',
822+ 'InstantMessaging': 'Internet;Chat',
823+ 'IRCClient': 'Internet;Chat',
824+ 'FileTransfer': 'Internet;File Sharing',
825+ 'Email': 'Internet;Mail',
826+ 'WebBrowser': 'Internet;Web Browsers',
827+ 'Astronomy': 'Science & Engineering;Astronomy',
828+ 'Biology': 'Science & Engineering;Biology',
829+ 'Chemistry': 'Science & Engineering;Chemistry',
830+ 'ArtificialIntelligence': 'Science & Engineering;Computing & Robotics',
831+ 'ComputerScience': 'Science & Engineering;Computing & Robotics',
832+ 'Robotics': 'Science & Engineering;Computing & Robotics',
833+ 'Electronics': 'Science & Engineering;Electronics',
834+ 'Engineering': 'Science & Engineering;Engineering',
835+ 'Geography': 'Science & Engineering;Geography',
836+ 'Geology': 'Science & Engineering;Geology',
837+ 'Geoscience': 'Science & Engineering;Geology',
838+ 'DataVisualization': 'Science & Engineering;Mathematics',
839+ 'Math': 'Science & Engineering;Mathematics',
840+ 'NumericalAnalysis': 'Science & Engineering;Mathematics',
841+ 'MedicalSoftware': 'Science & Engineering;Medicine',
842+ 'Electricity': 'Science & Engineering;Physics',
843+ 'Physics': 'Science & Engineering;Physics',
844+ 'Debugger': 'Developer Tools;Debugging',
845+ 'GUIDesigner': 'Developer Tools;Graphic Interface Design',
846+ 'IDE': 'Developer Tools;IDEs',
847+ 'Translation': 'Developer Tools;Localization',
848+ 'Profiling': 'Developer Tools;Profiling',
849+ 'RevisionControl': 'Developer Tools;Version Control',
850+ 'WebDevelopment': 'Developer Tools;Web Development',
851 }
852
853=== modified file 'softwarecenter/db/database.py'
854--- softwarecenter/db/database.py 2012-11-23 22:57:21 +0000
855+++ softwarecenter/db/database.py 2012-11-28 17:42:20 +0000
856@@ -34,7 +34,7 @@
857 AVAILABLE_FOR_PURCHASE_MAGIC_CHANNEL_NAME,
858 PkgStates,
859 XapianValues
860- )
861+)
862
863 from softwarecenter.paths import XAPIAN_BASE_PATH_SOFTWARE_CENTER_AGENT
864 from gettext import gettext as _
865
866=== modified file 'softwarecenter/db/dataprovider.py'
867--- softwarecenter/db/dataprovider.py 2012-11-23 22:57:21 +0000
868+++ softwarecenter/db/dataprovider.py 2012-11-28 17:42:20 +0000
869@@ -29,7 +29,7 @@
870 from .categories import (
871 CategoriesParser,
872 get_category_by_name,
873- )
874+)
875 from .database import StoreDatabase
876 from .application import Application
877 from softwarecenter.backend.reviews import get_review_loader
878@@ -159,7 +159,7 @@
879 self.db.get_pkgname(doc),
880 self.db.get_iconname(doc),
881 self.db.get_desktopfile(doc),
882- ))
883+ ))
884 return result
885
886
887
888=== modified file 'softwarecenter/db/pkginfo.py'
889--- softwarecenter/db/pkginfo.py 2012-10-05 04:31:08 +0000
890+++ softwarecenter/db/pkginfo.py 2012-11-28 17:42:20 +0000
891@@ -112,20 +112,21 @@
892 class PackageInfo(GObject.GObject):
893 """ abstract interface for the packageinfo information """
894
895- __gsignals__ = {'cache-ready': (GObject.SIGNAL_RUN_FIRST,
896- GObject.TYPE_NONE,
897- ()),
898- 'cache-invalid': (GObject.SIGNAL_RUN_FIRST,
899- GObject.TYPE_NONE,
900- ()),
901- 'cache-broken': (GObject.SIGNAL_RUN_FIRST,
902- GObject.TYPE_NONE,
903- ()),
904- 'query-total-size-on-install-done': (
905- GObject.SIGNAL_RUN_FIRST,
906- GObject.TYPE_NONE,
907- (str, int, int)),
908- }
909+ __gsignals__ = {
910+ 'cache-ready': (GObject.SIGNAL_RUN_FIRST,
911+ GObject.TYPE_NONE,
912+ ()),
913+ 'cache-invalid': (GObject.SIGNAL_RUN_FIRST,
914+ GObject.TYPE_NONE,
915+ ()),
916+ 'cache-broken': (GObject.SIGNAL_RUN_FIRST,
917+ GObject.TYPE_NONE,
918+ ()),
919+ 'query-total-size-on-install-done': (
920+ GObject.SIGNAL_RUN_FIRST,
921+ GObject.TYPE_NONE,
922+ (str, int, int)),
923+ }
924
925 def __getitem__(self, k):
926 return _Package(k, self)
927
928=== modified file 'softwarecenter/db/pkginfo_impl/packagekit.py'
929--- softwarecenter/db/pkginfo_impl/packagekit.py 2012-10-05 04:33:47 +0000
930+++ softwarecenter/db/pkginfo_impl/packagekit.py 2012-11-28 17:42:20 +0000
931@@ -237,9 +237,10 @@
932 if not p:
933 return []
934 autoremove = False
935- res = self.client.simulate_remove_packages((p.get_id(),),
936- autoremove, None,
937- self._on_progress_changed, None,
938+ res = self.client.simulate_remove_packages(
939+ (p.get_id(),),
940+ autoremove, None,
941+ self._on_progress_changed, None,
942 )
943 if not res:
944 return []
945@@ -253,9 +254,10 @@
946 p = self._get_one_package(pkg.name)
947 if not p:
948 return []
949- res = self.client.simulate_install_packages((p.get_id(),),
950- None,
951- self._on_progress_changed, None,
952+ res = self.client.simulate_install_packages(
953+ (p.get_id(),),
954+ None,
955+ self._on_progress_changed, None,
956 )
957 if not res:
958 return []
959@@ -331,10 +333,11 @@
960 def _get_packages(self, pkgname, pfilter=packagekit.FilterEnum.NONE):
961 """ resolve a package name into a PkPackage object or return None """
962 pfilter = 1 << pfilter
963- result = self.client.resolve(pfilter,
964- (pkgname,),
965- None,
966- self._on_progress_changed, None
967+ result = self.client.resolve(
968+ pfilter,
969+ (pkgname,),
970+ None,
971+ self._on_progress_changed, None
972 )
973 pkgs = result.get_package_array()
974 return pkgs
975
976=== modified file 'softwarecenter/db/update.py'
977--- softwarecenter/db/update.py 2012-11-23 22:57:21 +0000
978+++ softwarecenter/db/update.py 2012-11-28 17:42:20 +0000
979@@ -74,12 +74,12 @@
980 from softwarecenter.distro import (
981 get_current_arch,
982 get_foreign_architectures,
983- )
984+)
985 from softwarecenter.region import (
986 get_region_cached,
987 REGION_BLACKLIST_TAG,
988 REGION_WHITELIST_TAG,
989- )
990+)
991
992
993 # weights for the different fields
994
995=== modified file 'softwarecenter/distro/__init__.py'
996--- softwarecenter/distro/__init__.py 2012-11-23 22:57:21 +0000
997+++ softwarecenter/distro/__init__.py 2012-11-28 17:42:20 +0000
998@@ -38,10 +38,10 @@
999
1000 # base path for the review summary, the JS will append %i.png
1001 # (with i={1,5})
1002- REVIEW_SUMMARY_STARS_BASE_PATH = ("/usr/share/software-center/images/"
1003- "review-summary")
1004+ REVIEW_SUMMARY_STARS_BASE_PATH = \
1005+ "/usr/share/software-center/images/review-summary"
1006 REVIEWS_SERVER = (os.environ.get("SOFTWARE_CENTER_REVIEWS_HOST") or
1007- "http://localhost:8000")
1008+ "http://localhost:8000")
1009
1010 # You need to set this var to enable purchases
1011 PURCHASE_APP_URL = ""
1012@@ -64,7 +64,7 @@
1013 The description of the application displayed in the about dialog
1014 """
1015 return _("Lets you choose from thousands of applications available "
1016- "for your system.")
1017+ "for your system.")
1018
1019 def get_distro_channel_name(self):
1020 """ The name of the main channel in the Release file (e.g. Ubuntu)"""
1021@@ -87,7 +87,7 @@
1022 return self._distro_code_name
1023
1024 def get_maintenance_status(self, cache, appname, pkgname, component,
1025- channelname):
1026+ channelname):
1027 raise UnimplementedError
1028
1029 def get_license_text(self, component):
1030@@ -110,16 +110,17 @@
1031
1032 def get_install_warning_text(self, cache, pkg, appname, depends):
1033 primary = (utf8(_("To install %s, these items must be removed:")) %
1034- utf8(appname))
1035+ utf8(appname))
1036 button_text = _("Install Anyway")
1037
1038 # alter it if a meta-package is affected
1039 for m in depends:
1040 if cache[m].section == "metapackages":
1041- primary = utf8(_("If you install %s, future updates will not "
1042- "include new items in <b>%s</b> set. "
1043- "Are you sure you want to continue?")) % (
1044- utf8(appname), cache[m].installed.summary)
1045+ primary = utf8(
1046+ _("If you install %s, future updates will not "
1047+ "include new items in <b>%s</b> set. "
1048+ "Are you sure you want to continue?")) % (
1049+ utf8(appname), cache[m].installed.summary)
1050 button_text = _("Install Anyway")
1051 depends = []
1052 break
1053
1054=== modified file 'softwarecenter/distro/debian.py'
1055--- softwarecenter/distro/debian.py 2012-08-08 11:20:12 +0000
1056+++ softwarecenter/distro/debian.py 2012-11-28 17:42:20 +0000
1057@@ -30,9 +30,9 @@
1058
1059 # screenshot handling
1060 SCREENSHOT_THUMB_URL = ("http://screenshots.debian.net/"
1061- "thumbnail/%(pkgname)s")
1062+ "thumbnail/%(pkgname)s")
1063 SCREENSHOT_LARGE_URL = ("http://screenshots.debian.net/"
1064- "screenshot/%(pkgname)s")
1065+ "screenshot/%(pkgname)s")
1066 # the json description of the available screenshots
1067 SCREENSHOT_JSON_URL = "http://screenshots.debian.net/json/package/%s"
1068
1069@@ -58,8 +58,8 @@
1070 if cache[m].section == "metapackages":
1071 primary = _("If you uninstall %s, future updates will not "
1072 "include new items in <b>%s</b> set. "
1073- "Are you sure you want to continue?") % (appname,
1074- cache[m].installed.summary)
1075+ "Are you sure you want to continue?") % (
1076+ appname, cache[m].installed.summary)
1077 button_text = _("Remove Anyway")
1078 depends = []
1079 break
1080@@ -68,9 +68,9 @@
1081 for m in self.IMPORTANT_METAPACKAGES:
1082 if m in depends:
1083 primary = _("%s is a core application in Debian. "
1084- "Uninstalling it may cause future upgrades "
1085- "to be incomplete. Are you sure you want to "
1086- "continue?") % appname
1087+ "Uninstalling it may cause future upgrades "
1088+ "to be incomplete. Are you sure you want to "
1089+ "continue?") % appname
1090 button_text = _("Remove Anyway")
1091 depends = None
1092 break
1093@@ -91,8 +91,9 @@
1094
1095 def get_foreign_architectures(self):
1096 import subprocess
1097- out = subprocess.Popen(['dpkg', '--print-foreign-architectures'],
1098- stdout=subprocess.PIPE).communicate()[0].rstrip('\n')
1099+ out = subprocess.Popen(
1100+ ['dpkg', '--print-foreign-architectures'],
1101+ stdout=subprocess.PIPE).communicate()[0].rstrip('\n')
1102 if out:
1103 return out.split(' ')
1104 return []
1105@@ -103,13 +104,13 @@
1106 if pkgname in cache and cache[pkgname].candidate:
1107 for origin in cache[pkgname].candidate.origins:
1108 if (origin.origin == "Debian" and
1109- origin.trusted and
1110- origin.component == "main"):
1111+ origin.trusted and
1112+ origin.component == "main"):
1113 return True
1114 return False
1115
1116 def get_maintenance_status(self, cache, appname, pkgname, component,
1117- channelname):
1118+ channelname):
1119 """Return the maintenance status of a package."""
1120 if not hasattr(cache, '_cache') or not pkgname:
1121 return
1122@@ -157,6 +158,6 @@
1123 if __name__ == "__main__":
1124 cache = apt.Cache()
1125 print(cache.get_maintenance_status(cache, "synaptic app", "synaptic",
1126- "main", None))
1127+ "main", None))
1128 print(cache.get_maintenance_status(cache, "3dchess app", "3dchess",
1129- "universe", None))
1130+ "universe", None))
1131
1132=== modified file 'softwarecenter/distro/fedora.py'
1133--- softwarecenter/distro/fedora.py 2012-08-08 11:20:12 +0000
1134+++ softwarecenter/distro/fedora.py 2012-11-28 17:42:20 +0000
1135@@ -39,9 +39,9 @@
1136 # screenshot handling
1137 # FIXME - fedora should get its own proxy eventually
1138 SCREENSHOT_THUMB_URL = ("http://screenshots.ubuntu.com/"
1139- "thumbnail-with-version/%(pkgname)s/%(version)s")
1140+ "thumbnail-with-version/%(pkgname)s/%(version)s")
1141 SCREENSHOT_LARGE_URL = ("http://screenshots.ubuntu.com/"
1142- "screenshot-with-version/%(pkgname)s/%(version)s")
1143+ "screenshot-with-version/%(pkgname)s/%(version)s")
1144 SCREENSHOT_JSON_URL = "http://screenshots.ubuntu.com/json/package/%s"
1145
1146 # reviews
1147@@ -49,9 +49,9 @@
1148 # some point I imagine :) (or a alternative backend)
1149 #
1150 REVIEWS_SERVER = (os.environ.get("SOFTWARE_CENTER_REVIEWS_HOST") or
1151- "http://reviews.ubuntu.com/reviews/api/1.0")
1152+ "http://reviews.ubuntu.com/reviews/api/1.0")
1153 REVIEWS_URL = (REVIEWS_SERVER + "/reviews/filter/%(language)s/%(origin)s/"
1154- "%(distroseries)s/%(version)s/%(pkgname)s%(appname)s/")
1155+ "%(distroseries)s/%(version)s/%(pkgname)s%(appname)s/")
1156
1157 REVIEW_STATS_URL = REVIEWS_SERVER + "/review-stats"
1158
1159@@ -92,7 +92,7 @@
1160 return origin == 'fedora' or origin == 'updates'
1161
1162 def get_maintenance_status(self, cache, appname, pkgname, component,
1163- channelname):
1164+ channelname):
1165 # FIXME
1166 pass
1167
1168
1169=== modified file 'softwarecenter/distro/suselinux.py'
1170--- softwarecenter/distro/suselinux.py 2012-08-08 11:20:12 +0000
1171+++ softwarecenter/distro/suselinux.py 2012-11-28 17:42:20 +0000
1172@@ -24,20 +24,20 @@
1173 class Suselinux(Distro):
1174 # see __init__.py description
1175 DISTROSERIES = ["11.4",
1176- ]
1177+ ]
1178
1179 # screenshot handling
1180 SCREENSHOT_THUMB_URL = ("http://screenshots.ubuntu.com/"
1181- "thumbnail-with-version/%(pkgname)s/%(version)s")
1182+ "thumbnail-with-version/%(pkgname)s/%(version)s")
1183 SCREENSHOT_LARGE_URL = ("http://screenshots.ubuntu.com/"
1184- "screenshot-with-version/%(pkgname)s/%(version)s")
1185+ "screenshot-with-version/%(pkgname)s/%(version)s")
1186 SCREENSHOT_JSON_URL = "http://screenshots.ubuntu.com/json/package/%s"
1187
1188 # reviews
1189 REVIEWS_SERVER = (os.environ.get("SOFTWARE_CENTER_REVIEWS_HOST") or
1190- "http://reviews.ubuntu.com/reviews/api/1.0")
1191+ "http://reviews.ubuntu.com/reviews/api/1.0")
1192 REVIEWS_URL = (REVIEWS_SERVER + "/reviews/filter/%(language)s/%(origin)s/"
1193- "%(distroseries)s/%(version)s/%(pkgname)s%(appname)s/")
1194+ "%(distroseries)s/%(version)s/%(pkgname)s%(appname)s/")
1195
1196 REVIEW_STATS_URL = REVIEWS_SERVER + "/review-stats"
1197
1198@@ -82,7 +82,7 @@
1199 return xapian.Query(xapian.Query.OP_AND, query1, query2)
1200
1201 def get_maintenance_status(self, cache, appname, pkgname, component,
1202- channelname):
1203+ channelname):
1204 # FIXME
1205 pass
1206
1207
1208=== modified file 'softwarecenter/distro/ubuntu.py'
1209--- softwarecenter/distro/ubuntu.py 2012-11-22 08:28:45 +0000
1210+++ softwarecenter/distro/ubuntu.py 2012-11-28 17:42:20 +0000
1211@@ -42,29 +42,29 @@
1212 "precise",
1213 "oneiric",
1214 "natty",
1215- ]
1216+ ]
1217
1218 # metapackages
1219 IMPORTANT_METAPACKAGES = ("ubuntu-desktop", "kubuntu-desktop")
1220
1221 # screenshot handling
1222 SCREENSHOT_THUMB_URL = ("http://screenshots.ubuntu.com/"
1223- "thumbnail-with-version/%(pkgname)s/%(version)s")
1224+ "thumbnail-with-version/%(pkgname)s/%(version)s")
1225 SCREENSHOT_LARGE_URL = ("http://screenshots.ubuntu.com/"
1226- "screenshot-with-version/%(pkgname)s/%(version)s")
1227+ "screenshot-with-version/%(pkgname)s/%(version)s")
1228
1229 # the json description of the available screenshots
1230 SCREENSHOT_JSON_URL = "http://screenshots.ubuntu.com/json/package/%s"
1231
1232 # purchase subscription
1233 PURCHASE_APP_URL = (BUY_SOMETHING_HOST + "/subscriptions/%s/ubuntu/%s/"
1234- "+new/?%s")
1235+ "+new/?%s")
1236
1237 # reviews
1238 REVIEWS_SERVER = (os.environ.get("SOFTWARE_CENTER_REVIEWS_HOST") or
1239- "http://reviews.ubuntu.com/reviews/api/1.0")
1240+ "http://reviews.ubuntu.com/reviews/api/1.0")
1241 REVIEWS_URL = (REVIEWS_SERVER + "/reviews/filter/%(language)s/%(origin)s/"
1242- "%(distroseries)s/%(version)s/%(pkgname)s%(appname)s/")
1243+ "%(distroseries)s/%(version)s/%(pkgname)s%(appname)s/")
1244
1245 #REVIEW_STATS_URL = (REVIEWS_SERVER + "/reviews/api/1.0/%(language)s/"
1246 # "%(origin)s/%(distroseries)s/review-stats/")
1247@@ -79,7 +79,7 @@
1248
1249 def get_app_description(self):
1250 return _("Lets you choose from thousands of applications available "
1251- "for Ubuntu.")
1252+ "for Ubuntu.")
1253
1254 def get_distro_channel_name(self):
1255 """ The name in the Release file """
1256@@ -98,9 +98,9 @@
1257 for m in self.IMPORTANT_METAPACKAGES:
1258 if m in depends:
1259 primary = _("%s is a core item in Ubuntu. "
1260- "Removing it may cause future upgrades "
1261- "to be incomplete. Are you sure you want to "
1262- "continue?") % appname
1263+ "Removing it may cause future upgrades "
1264+ "to be incomplete. Are you sure you want to "
1265+ "continue?") % appname
1266 button_text = _("Remove Anyway")
1267 depends = []
1268 break
1269@@ -109,9 +109,9 @@
1270 for m in depends:
1271 if cache[m].section == "metapackages":
1272 primary = _("If you uninstall %s, future updates will not "
1273- "include new items in <b>%s</b> set. "
1274- "Are you sure you want to continue?") % (appname,
1275- cache[m].installed.summary)
1276+ "include new items in <b>%s</b> set. "
1277+ "Are you sure you want to continue?") % (
1278+ appname, cache[m].installed.summary)
1279 button_text = _("Remove Anyway")
1280 depends = []
1281 break
1282@@ -154,7 +154,7 @@
1283 return _("Canonical-Maintained Software")
1284
1285 def get_maintenance_status(self, cache, appname, pkgname, component,
1286- channelname):
1287+ channelname):
1288 # try to figure out the support dates of the release and make
1289 # sure to look only for stuff in "Ubuntu" and "distro_codename"
1290 # (to exclude stuff in ubuntu-updates for the support time
1291@@ -180,7 +180,7 @@
1292
1293 # see if we have a "Supported" entry in the pkg record
1294 if (pkgname in cache and
1295- cache[pkgname].candidate):
1296+ cache[pkgname].candidate):
1297 support_time = cache._cache[pkgname].candidate.record.get(
1298 "Supported")
1299 if support_time:
1300@@ -190,7 +190,7 @@
1301 support_month = int(support_time.strip("m"))
1302 else:
1303 LOG.warning("unsupported 'Supported' string '%s'" %
1304- support_time)
1305+ support_time)
1306
1307 # mvo: we do not define the end date very precisely
1308 # currently this is why it will just display a end
1309@@ -210,12 +210,12 @@
1310 "Updates may be available in a newer version of "
1311 "Ubuntu.") % (appname, self.get_distro_release())
1312 else:
1313+ d = {'appname': appname,
1314+ 'support_end_month_str': support_end_month_str,
1315+ 'support_end_year': support_end_year}
1316 return _("Canonical provides critical updates for "
1317 "%(appname)s until %(support_end_month_str)s "
1318- "%(support_end_year)s.") % {
1319- 'appname': appname,
1320- 'support_end_month_str': support_end_month_str,
1321- 'support_end_year': support_end_year}
1322+ "%(support_end_year)s.") % d
1323 elif component == "restricted":
1324 if support_ended:
1325 return _("Canonical does no longer provide "
1326@@ -223,19 +223,19 @@
1327 "Updates may be available in a newer version of "
1328 "Ubuntu.") % (appname, self.get_distro_release())
1329 else:
1330+ d = {'appname': appname,
1331+ 'support_end_month_str': support_end_month_str,
1332+ 'support_end_year': support_end_year,
1333+ }
1334 return _("Canonical provides critical updates supplied "
1335 "by the developers of %(appname)s until "
1336 "%(support_end_month_str)s "
1337- "%(support_end_year)s.") % {
1338- 'appname': appname,
1339- 'support_end_month_str': support_end_month_str,
1340- 'support_end_year': support_end_year,
1341- }
1342+ "%(support_end_year)s.") % d
1343
1344 # if we couldn't determine a support date, use a generic maintenance
1345 # string without the date
1346 if (channelname or
1347- component in ("partner", "independent", "commercial")):
1348+ component in ("partner", "independent", "commercial")):
1349 return _("Provided by the vendor.")
1350 elif component == "main":
1351 return _("Canonical provides critical updates for %s.") % appname
1352@@ -276,13 +276,13 @@
1353 #raise ValueError("we currently support downloadable icons in "
1354 # "ppa's only")
1355 LOG.warning("downloadable icon is not supported for archive: '%s'"
1356- % full_archive_url)
1357+ % full_archive_url)
1358 return ''
1359
1360 if __name__ == "__main__":
1361 import apt
1362 cache = apt.Cache()
1363 print cache.get_maintenance_status(cache, "synaptic app", "synaptic",
1364- "main", None)
1365+ "main", None)
1366 print cache.get_maintenance_status(cache, "3dchess app", "3dchess",
1367- "universe", None)
1368+ "universe", None)
1369
1370=== modified file 'softwarecenter/enums.py'
1371--- softwarecenter/enums.py 2012-11-23 22:57:21 +0000
1372+++ softwarecenter/enums.py 2012-11-28 17:42:20 +0000
1373@@ -29,23 +29,22 @@
1374 "To reinstall previous purchases, sign in to the "
1375 "Ubuntu Single Sign-On account you used to pay for them.")
1376
1377-SOFTWARE_CENTER_DEBUG_TABS = os.environ.get('SOFTWARE_CENTER_DEBUG_TABS',
1378- False)
1379+SOFTWARE_CENTER_DEBUG_TABS = os.environ.get(
1380+ 'SOFTWARE_CENTER_DEBUG_TABS', False)
1381
1382-SOFTWARE_CENTER_BUY_HOST = os.environ.get("SOFTWARE_CENTER_BUY_HOST",
1383- "https://software-center.ubuntu.com")
1384+SOFTWARE_CENTER_BUY_HOST = os.environ.get(
1385+ "SOFTWARE_CENTER_BUY_HOST", "https://software-center.ubuntu.com")
1386
1387 # buy-something base url
1388 #BUY_SOMETHING_HOST = "http://localhost:8000/"
1389-BUY_SOMETHING_HOST = os.environ.get("SOFTWARE_CENTER_AGENT_HOST",
1390- SOFTWARE_CENTER_BUY_HOST)
1391+BUY_SOMETHING_HOST = os.environ.get(
1392+ "SOFTWARE_CENTER_AGENT_HOST", SOFTWARE_CENTER_BUY_HOST)
1393
1394 BUY_SOMETHING_HOST_ANONYMOUS = BUY_SOMETHING_HOST
1395
1396 # recommender
1397-RECOMMENDER_HOST = os.environ.get("SOFTWARE_CENTER_RECOMMENDER_HOST",
1398- "https://rec.ubuntu.com")
1399-# "https://rec.staging.ubuntu.com")
1400+RECOMMENDER_HOST = os.environ.get(
1401+ "SOFTWARE_CENTER_RECOMMENDER_HOST", "https://rec.ubuntu.com")
1402
1403 # for the sso login. ussoc expects the USSOC_SERVICE_URL environment variable
1404 # to be a full path to the service root (including /api/1.0), not just the
1405@@ -86,7 +85,7 @@
1406 INSTALLED,
1407 CHANNEL,
1408 HISTORY
1409- )
1410+ )
1411
1412
1413 # define ID values for the various buttons found in the navigation bar
1414@@ -125,7 +124,7 @@
1415 BY_SEARCH_RANKING,
1416 BY_CATALOGED_TIME,
1417 BY_TOP_RATED,
1418- ) = range(5)
1419+ ) = range(5)
1420
1421
1422 class ReviewSortMethods:
1423@@ -250,7 +249,7 @@
1424 NOT_FOUND = "not_found"
1425 # its purchased but not found for the current series
1426 PURCHASED_BUT_NOT_AVAILABLE_FOR_SERIES = \
1427- "purchased_but_not_available_for_series"
1428+ "purchased_but_not_available_for_series"
1429 # something went wrong and we don't have a state for this PKG
1430 UNKNOWN = "unknown"
1431
1432
1433=== modified file 'softwarecenter/gwibber_helper.py'
1434--- softwarecenter/gwibber_helper.py 2012-03-15 10:43:13 +0000
1435+++ softwarecenter/gwibber_helper.py 2012-11-28 17:42:20 +0000
1436@@ -97,8 +97,8 @@
1437 u'receive_enabled': True,
1438 u'access_token': u'some_access_token',
1439 u'send_enabled': True,
1440- u'id': u'twitter-id-random-15af8bddb6'}
1441- ]
1442+ u'id': u'twitter-id-random-15af8bddb6',
1443+ }]
1444 fake_gwibber_accounts_multiple = [
1445 {u'username': u'random1 with a very long name',
1446 u'user_id': u'2342342313',
1447@@ -117,8 +117,7 @@
1448 u'receive_enabled': True,
1449 u'access_token': u'some_access_token',
1450 u'send_enabled': True,
1451- u'id': u'twitter-id-mpt-afsdfsa'}
1452- ]
1453+ u'id': u'twitter-id-mpt-afsdfsa'}]
1454
1455 def accounts(self):
1456 import copy
1457@@ -136,7 +135,7 @@
1458 # of every 5 attempts
1459 r = random()
1460 if (r < 0.2 and
1461- not "SOFTWARE_CENTER_GWIBBER_MOCK_NO_FAIL" in os.environ):
1462+ not "SOFTWARE_CENTER_GWIBBER_MOCK_NO_FAIL" in os.environ):
1463 return False
1464 return True
1465
1466@@ -144,5 +143,5 @@
1467 return True
1468
1469
1470-GWIBBER_SERVICE_AVAILABLE = GwibberHelper.has_accounts_in_sqlite() and \
1471- os.path.exists("/usr/bin/gwibber-poster")
1472+GWIBBER_SERVICE_AVAILABLE = (GwibberHelper.has_accounts_in_sqlite() and
1473+ os.path.exists("/usr/bin/gwibber-poster"))
1474
1475=== modified file 'softwarecenter/hw.py'
1476--- softwarecenter/hw.py 2012-11-23 22:57:21 +0000
1477+++ softwarecenter/hw.py 2012-11-28 17:42:20 +0000
1478@@ -49,32 +49,32 @@
1479 'hardware::digicam': _('This software requires a digital camera, but none '
1480 'are currently connected'),
1481 'hardware::webcam': _('This software requires a video camera, but none '
1482- 'are currently connected'),
1483+ 'are currently connected'),
1484 'hardware::input:mouse': _('This software requires a mouse, '
1485- 'but none is currently set up.'),
1486+ 'but none is currently set up.'),
1487 'hardware::input:joystick': _('This software requires a joystick, '
1488- 'but none are currently connected.'),
1489+ 'but none are currently connected.'),
1490 'hardware::input:touchscreen': _('This software requires a touchscreen, '
1491- 'but the computer does not have one.'),
1492+ 'but the computer does not have one.'),
1493 'hardware::gps': _('This software requires a GPS, '
1494- 'but the computer does not have one.'),
1495+ 'but the computer does not have one.'),
1496 'hardware::laptop': _('This software is for notebook computers.'),
1497 'hardware::printer': _('This software requires a printer, but none '
1498 'are currently set up.'),
1499 'hardware::scanner': _('This software requires a scanner, but none are '
1500- 'currently set up.'),
1501+ 'currently set up.'),
1502 'hardware::storage:cd': _('This software requires a CD drive, but none '
1503- 'are currently connected.'),
1504+ 'are currently connected.'),
1505 'hardware::storage:cd-writer': _('This software requires a CD burner, '
1506- 'but none are currently connected.'),
1507+ 'but none are currently connected.'),
1508 'hardware::storage:dvd': _('This software requires a DVD drive, but none '
1509- 'are currently connected.'),
1510+ 'are currently connected.'),
1511 'hardware::storage:dvd-writer': _('This software requires a DVD burner, '
1512- 'but none are currently connected.'),
1513+ 'but none are currently connected.'),
1514 'hardware::storage:floppy': _('This software requires a floppy disk '
1515- 'drive, but none are currently connected.'),
1516+ 'drive, but none are currently connected.'),
1517 'hardware::video:opengl': _('This computer does not have graphics fast '
1518- 'enough for this software.'),
1519+ 'enough for this software.'),
1520 # private extension
1521 OPENGL_DRIVER_BLACKLIST_TAG: _(u'This software does not work with the '
1522 u'\u201c%s\u201D graphics driver this '
1523
1524=== modified file 'softwarecenter/log.py'
1525--- softwarecenter/log.py 2012-11-23 22:57:21 +0000
1526+++ softwarecenter/log.py 2012-11-28 17:42:20 +0000
1527@@ -54,8 +54,8 @@
1528 def filter(self, record):
1529 for (fname, flen) in self.filters:
1530 if (flen == 0 or
1531- fname == record.name or
1532- (len(record.name) > flen and record.name[flen] == ".")):
1533+ fname == record.name or
1534+ (len(record.name) > flen and record.name[flen] == ".")):
1535 return 1
1536 return 0
1537
1538
1539=== modified file 'softwarecenter/netstatus.py'
1540--- softwarecenter/netstatus.py 2012-11-23 22:57:21 +0000
1541+++ softwarecenter/netstatus.py 2012-11-28 17:42:20 +0000
1542@@ -63,7 +63,7 @@
1543 NM_STATE_DISCONNECTED_OLD = 4
1544 NM_STATE_DISCONNECTED = 20
1545 NM_STATE_DISCONNECTED_LIST = [NM_STATE_DISCONNECTED_OLD,
1546- NM_STATE_DISCONNECTED]
1547+ NM_STATE_DISCONNECTED]
1548
1549
1550 class NetworkStatusWatcher(GObject.GObject):
1551@@ -71,7 +71,7 @@
1552 __gsignals__ = {'changed': (GObject.SIGNAL_RUN_FIRST,
1553 GObject.TYPE_NONE,
1554 (int,)),
1555- }
1556+ }
1557
1558 def __init__(self):
1559 GObject.GObject.__init__(self)
1560@@ -153,8 +153,7 @@
1561 ping = subprocess.Popen(
1562 ["ping", "-c", "1", host],
1563 stdout=subprocess.PIPE,
1564- stderr=subprocess.PIPE
1565- )
1566+ stderr=subprocess.PIPE)
1567
1568 out, error = ping.communicate()
1569 if len(error.splitlines()):
1570@@ -188,7 +187,7 @@
1571 """ get bool if we are connected """
1572 # unknown because in doubt, just assume we have network
1573 return get_network_state() in NetState.NM_STATE_UNKNOWN_LIST + \
1574- NetState.NM_STATE_CONNECTED_LIST
1575+ NetState.NM_STATE_CONNECTED_LIST
1576
1577 # init it once
1578 __init_network_state()
1579
1580=== modified file 'softwarecenter/paths.py'
1581--- softwarecenter/paths.py 2012-11-23 22:57:21 +0000
1582+++ softwarecenter/paths.py 2012-11-28 17:42:20 +0000
1583@@ -47,11 +47,11 @@
1584 os.environ.get("SOFTWARE_CENTER_PLUGINS_DIR", ""),
1585 os.path.join(SOFTWARE_CENTER_BASE, "plugins"),
1586 os.path.join(xdg.xdg_data_home, "software-center", "plugins"),
1587- ]
1588+]
1589
1590 # FIXME: use relative paths here
1591 INSTALLED_ICON = \
1592- "/usr/share/software-center/icons/software-center-installed.png"
1593+ "/usr/share/software-center/icons/software-center-installed.png"
1594
1595 # xapian paths
1596 XAPIAN_BASE_PATH = "/var/cache/software-center"
1597
1598=== modified file 'softwarecenter/plugin.py'
1599--- softwarecenter/plugin.py 2012-11-23 22:57:21 +0000
1600+++ softwarecenter/plugin.py 2012-11-28 17:42:20 +0000
1601@@ -63,9 +63,9 @@
1602 LOG.debug("no dir '%s'" % dirname)
1603 continue
1604 basenames = [x for x in os.listdir(dirname)
1605- if x.endswith(".py")]
1606+ if x.endswith(".py")]
1607 LOG.debug("Plugin modules in %s: %s" %
1608- (dirname, " ".join(basenames)))
1609+ (dirname, " ".join(basenames)))
1610 names += [os.path.join(dirname, x) for x in basenames]
1611 return names
1612
1613@@ -76,7 +76,7 @@
1614 if inspect.isclass(member) and issubclass(member, Plugin):
1615 plugins.append(member)
1616 LOG.debug("Plugins in %s: %s" %
1617- (module, " ".join(str(x) for x in plugins)))
1618+ (module, " ".join(str(x) for x in plugins)))
1619 return [plugin() for plugin in plugins]
1620
1621 def _load_module(self, filename):
1622@@ -89,7 +89,7 @@
1623 (".py", "r", imp.PY_SOURCE))
1624 except Exception as e: # pragma: no cover
1625 LOG.warning("Failed to load plugin '%s' (%s)" %
1626- (module_name, e))
1627+ (module_name, e))
1628 return None
1629 f.close()
1630 return module
1631
1632=== modified file 'softwarecenter/region.py'
1633--- softwarecenter/region.py 2012-11-23 22:57:21 +0000
1634+++ softwarecenter/region.py 2012-11-28 17:42:20 +0000
1635@@ -102,7 +102,7 @@
1636 """ return dict estimate about the current countrycode/country """
1637 res = {'countrycode': '',
1638 'country': '',
1639- }
1640+ }
1641 try:
1642 # use LC_MONETARY as the best guess
1643 loc = locale.getlocale(locale.LC_MONETARY)[0]
1644
1645=== modified file 'softwarecenter/sso/gui.py'
1646--- softwarecenter/sso/gui.py 2012-11-23 22:57:21 +0000
1647+++ softwarecenter/sso/gui.py 2012-11-28 17:42:20 +0000
1648@@ -289,31 +289,31 @@
1649
1650 self._signals = {
1651 'CaptchaGenerated':
1652- self._filter_by_app_name(self.on_captcha_generated),
1653+ self._filter_by_app_name(self.on_captcha_generated),
1654 'CaptchaGenerationError':
1655- self._filter_by_app_name(self.on_captcha_generation_error),
1656+ self._filter_by_app_name(self.on_captcha_generation_error),
1657 'UserRegistered':
1658- self._filter_by_app_name(self.on_user_registered),
1659+ self._filter_by_app_name(self.on_user_registered),
1660 'UserRegistrationError':
1661- self._filter_by_app_name(self.on_user_registration_error),
1662+ self._filter_by_app_name(self.on_user_registration_error),
1663 'EmailValidated':
1664- self._filter_by_app_name(self.on_email_validated),
1665+ self._filter_by_app_name(self.on_email_validated),
1666 'EmailValidationError':
1667- self._filter_by_app_name(self.on_email_validation_error),
1668+ self._filter_by_app_name(self.on_email_validation_error),
1669 'LoggedIn':
1670- self._filter_by_app_name(self.on_logged_in),
1671+ self._filter_by_app_name(self.on_logged_in),
1672 'LoginError':
1673- self._filter_by_app_name(self.on_login_error),
1674+ self._filter_by_app_name(self.on_login_error),
1675 'UserNotValidated':
1676- self._filter_by_app_name(self.on_user_not_validated),
1677+ self._filter_by_app_name(self.on_user_not_validated),
1678 'PasswordResetTokenSent':
1679- self._filter_by_app_name(self.on_password_reset_token_sent),
1680+ self._filter_by_app_name(self.on_password_reset_token_sent),
1681 'PasswordResetError':
1682- self._filter_by_app_name(self.on_password_reset_error),
1683+ self._filter_by_app_name(self.on_password_reset_error),
1684 'PasswordChanged':
1685- self._filter_by_app_name(self.on_password_changed),
1686+ self._filter_by_app_name(self.on_password_changed),
1687 'PasswordChangeError':
1688- self._filter_by_app_name(self.on_password_change_error),
1689+ self._filter_by_app_name(self.on_password_change_error),
1690 }
1691
1692 if window_id != 0:
1693
1694=== modified file 'softwarecenter/sso/tests/__init__.py'
1695--- softwarecenter/sso/tests/__init__.py 2012-06-26 15:54:01 +0000
1696+++ softwarecenter/sso/tests/__init__.py 2012-11-28 17:42:20 +0000
1697@@ -15,9 +15,10 @@
1698 EMAIL = u'test@example.com'
1699 EMAIL_TOKEN = u'B2P☺ gtf'
1700 HELP_TEXT = u'☛ Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' \
1701-'Nam sed lorem nibh. Suspendisse gravida nulla non nunc suscipit pulvinar ' \
1702-'tempus ut augue. Morbi consequat, ligula a elementum pretium, ' \
1703-'dolor nulla tempus metus, sed viverra nisi risus non velit.'
1704+ 'Nam sed lorem nibh. Suspendisse gravida nulla non nunc suscipit ' \
1705+ 'pulvinar ' \
1706+ 'tempus ut augue. Morbi consequat, ligula a elementum pretium, ' \
1707+ 'dolor nulla tempus metus, sed viverra nisi risus non velit.'
1708 NAME = u'Juanito ☀ Pérez'
1709 PASSWORD = u'h3lloWorld☑ '
1710 PING_URL = u'http://localhost/ping-me/'
1711
1712=== modified file 'softwarecenter/ui/gtk3/app.py'
1713--- softwarecenter/ui/gtk3/app.py 2012-11-23 22:57:21 +0000
1714+++ softwarecenter/ui/gtk3/app.py 2012-11-28 17:42:20 +0000
1715@@ -54,7 +54,7 @@
1716 from softwarecenter.db import (
1717 DebFileApplication,
1718 DebFileOpenError,
1719- )
1720+)
1721 from softwarecenter.db.utils import run_software_center_agent
1722 from softwarecenter.i18n import init_locale
1723
1724@@ -89,7 +89,7 @@
1725 from softwarecenter.db.database import (
1726 StoreDatabase,
1727 get_reinstall_previous_purchases_query,
1728- )
1729+)
1730 try:
1731 from aptd_gtk3 import InstallBackendUI
1732 InstallBackendUI # pyflakes
1733@@ -111,11 +111,11 @@
1734 from softwarecenter.ui.gtk3.session.appmanager import (
1735 ApplicationManager,
1736 get_appmanager,
1737- )
1738+)
1739 from softwarecenter.ui.gtk3.session.viewmanager import (
1740 ViewManager,
1741 get_viewmanager,
1742- )
1743+)
1744 from softwarecenter.ui.gtk3.widgets.recommendations import (
1745 RecommendationsOptInDialog)
1746
1747
1748=== modified file 'softwarecenter/ui/gtk3/models/appstore2.py'
1749--- softwarecenter/ui/gtk3/models/appstore2.py 2012-11-23 22:57:21 +0000
1750+++ softwarecenter/ui/gtk3/models/appstore2.py 2012-11-28 17:42:20 +0000
1751@@ -35,13 +35,16 @@
1752 capitalize_first_word,
1753 utf8,
1754 unescape,
1755- )
1756+)
1757 from softwarecenter.backend.installbackend import get_install_backend
1758 from softwarecenter.backend.reviews import get_review_loader
1759 from softwarecenter.paths import SOFTWARE_CENTER_ICON_CACHE_DIR
1760
1761 from softwarecenter.db.categories import (
1762- category_subcat, category_cat, CategoriesParser)
1763+ category_subcat,
1764+ category_cat,
1765+ CategoriesParser,
1766+)
1767
1768 # global cache icons to speed up rendering
1769 _app_icon_cache = {}
1770@@ -94,7 +97,7 @@
1771 None,
1772 (str, ),
1773 ),
1774- }
1775+ }
1776
1777 def __init__(self, db, cache, icons, icon_size=48,
1778 global_icon_cache=False):
1779@@ -211,8 +214,8 @@
1780 summary = self.get_pkgname(doc)
1781
1782 return "%s\n<small>%s</small>" % (
1783- GObject.markup_escape_text(appname),
1784- GObject.markup_escape_text(summary))
1785+ GObject.markup_escape_text(appname),
1786+ GObject.markup_escape_text(summary))
1787
1788 def get_display_price(self, doc):
1789 app = self.db.get_application(doc)
1790@@ -421,13 +424,13 @@
1791 "appcount-changed": (GObject.SignalFlags.RUN_LAST,
1792 None,
1793 (GObject.TYPE_PYOBJECT, ),
1794- ),
1795+ ),
1796 # meh, this is a signal from AppPropertiesHelper
1797 "needs-refresh": (GObject.SignalFlags.RUN_LAST,
1798 None,
1799 (str, ),
1800- ),
1801- }
1802+ ),
1803+ }
1804
1805 def __init__(self, db, cache, icons, icon_size=AppGenericStore.ICON_SIZE,
1806 global_icon_cache=True):
1807@@ -507,8 +510,8 @@
1808 "needs-refresh": (GObject.SignalFlags.RUN_LAST,
1809 None,
1810 (str, ),
1811- ),
1812- }
1813+ ),
1814+ }
1815
1816 def __init__(self, db, cache, icons, icon_size=AppGenericStore.ICON_SIZE,
1817 global_icon_cache=True):
1818
1819=== modified file 'softwarecenter/ui/gtk3/panes/availablepane.py'
1820--- softwarecenter/ui/gtk3/panes/availablepane.py 2012-11-23 22:57:21 +0000
1821+++ softwarecenter/ui/gtk3/panes/availablepane.py 2012-11-28 17:42:20 +0000
1822@@ -75,7 +75,7 @@
1823 'list',
1824 'details',
1825 'purchase',
1826- )
1827+ )
1828 # actual page id's
1829 (LOBBY,
1830 SUBCATEGORY,
1831
1832=== modified file 'softwarecenter/ui/gtk3/panes/historypane.py'
1833--- softwarecenter/ui/gtk3/panes/historypane.py 2012-11-23 22:57:21 +0000
1834+++ softwarecenter/ui/gtk3/panes/historypane.py 2012-11-28 17:42:20 +0000
1835@@ -40,7 +40,7 @@
1836 "app-list-changed": (GObject.SignalFlags.RUN_LAST,
1837 None,
1838 (int, ),
1839- ),
1840+ ),
1841 "history-pane-created": (GObject.SignalFlags.RUN_FIRST,
1842 None,
1843 ()),
1844@@ -246,7 +246,7 @@
1845 actions = {self.INSTALLED: trans.install,
1846 self.REMOVED: trans.remove,
1847 self.UPGRADED: trans.upgrade,
1848- }
1849+ }
1850 for action, pkgs in actions.items():
1851 for pkgname in pkgs:
1852 row = (when, action, pkgname)
1853
1854=== modified file 'softwarecenter/ui/gtk3/panes/softwarepane.py'
1855--- softwarecenter/ui/gtk3/panes/softwarepane.py 2012-11-23 22:57:21 +0000
1856+++ softwarecenter/ui/gtk3/panes/softwarepane.py 2012-11-28 17:42:20 +0000
1857@@ -64,7 +64,7 @@
1858 "app-list-changed": (GObject.SignalFlags.RUN_LAST,
1859 None,
1860 (int,),
1861- ),
1862+ ),
1863 }
1864 PADDING = 6
1865
1866
1867=== modified file 'softwarecenter/ui/gtk3/review_gui_helper.py'
1868--- softwarecenter/ui/gtk3/review_gui_helper.py 2012-11-23 22:57:21 +0000
1869+++ softwarecenter/ui/gtk3/review_gui_helper.py 2012-11-28 17:42:20 +0000
1870@@ -168,9 +168,11 @@
1871 self._transmit_state = TRANSMIT_STATE_NONE
1872 self._transmit_error_str = ""
1873 self.display_name = "No display name"
1874- auth = piston_mini_client.auth.OAuthAuthorizer(token["token"],
1875- token["token_secret"], token["consumer_key"],
1876- token["consumer_secret"])
1877+ auth = piston_mini_client.auth.OAuthAuthorizer(
1878+ token["token"],
1879+ token["token_secret"],
1880+ token["consumer_key"],
1881+ token["consumer_secret"])
1882 # change default server to the SSL one
1883 distro = get_distro()
1884 service_root = distro.REVIEWS_SERVER
1885@@ -1135,11 +1137,10 @@
1886 def _gwibber_message_string_from_data(appname, rating, summary, link):
1887 """ helper so that we do not duplicate the "reviewed..." string """
1888 return _("reviewed %(appname)s in Ubuntu: %(rating)s "
1889- "%(summary)s %(link)s") % {
1890- 'appname': appname,
1891- 'rating': rating,
1892- 'summary': summary,
1893- 'link': link}
1894+ "%(summary)s %(link)s") % {'appname': appname,
1895+ 'rating': rating,
1896+ 'summary': summary,
1897+ 'link': link}
1898
1899 rating = self.star_rating.get_rating()
1900 rating_string = ''
1901@@ -1166,7 +1167,7 @@
1902 review_summary_text = (review_summary_text[:new_char_count] +
1903 u"\u2026")
1904 gwib_msg = _gwibber_message_string_from_data(
1905- self.app.name, rating_string, review_summary_text, app_link)
1906+ self.app.name, rating_string, review_summary_text, app_link)
1907
1908 return gwib_msg
1909
1910
1911=== modified file 'softwarecenter/ui/gtk3/session/appmanager.py'
1912--- softwarecenter/ui/gtk3/session/appmanager.py 2012-10-11 11:38:52 +0000
1913+++ softwarecenter/ui/gtk3/session/appmanager.py 2012-11-28 17:42:20 +0000
1914@@ -47,9 +47,9 @@
1915 class ApplicationManager(GObject.GObject):
1916
1917 __gsignals__ = {
1918- "purchase-requested": (GObject.SignalFlags.RUN_LAST,
1919- None,
1920- (GObject.TYPE_PYOBJECT, str, str,)
1921+ "purchase-requested": (GObject.SignalFlags.RUN_LAST,
1922+ None,
1923+ (GObject.TYPE_PYOBJECT, str, str,)
1924 ),
1925 }
1926
1927
1928=== modified file 'softwarecenter/ui/gtk3/session/displaystate.py'
1929--- softwarecenter/ui/gtk3/session/displaystate.py 2012-08-22 07:28:01 +0000
1930+++ softwarecenter/ui/gtk3/session/displaystate.py 2012-11-28 17:42:20 +0000
1931@@ -38,7 +38,7 @@
1932 'limit': (int,),
1933 'filter': (type(None), AppFilter),
1934 'vadjustment': (float, ),
1935- }
1936+ }
1937
1938 def __init__(self):
1939 self.category = None
1940
1941=== modified file 'softwarecenter/ui/gtk3/session/viewmanager.py'
1942--- softwarecenter/ui/gtk3/session/viewmanager.py 2012-08-20 09:09:45 +0000
1943+++ softwarecenter/ui/gtk3/session/viewmanager.py 2012-11-28 17:42:20 +0000
1944@@ -36,7 +36,7 @@
1945 "view-changed": (GObject.SignalFlags.RUN_LAST,
1946 None,
1947 (GObject.TYPE_PYOBJECT, ),
1948- ),
1949+ ),
1950 }
1951
1952 def __init__(self, notebook_view, options=None):
1953
1954=== modified file 'softwarecenter/ui/gtk3/views/appdetailsview.py'
1955--- softwarecenter/ui/gtk3/views/appdetailsview.py 2012-11-23 22:57:21 +0000
1956+++ softwarecenter/ui/gtk3/views/appdetailsview.py 2012-11-28 17:42:20 +0000
1957@@ -613,7 +613,7 @@
1958 __gsignals__ = {'table-built': (GObject.SignalFlags.RUN_FIRST,
1959 None,
1960 ()),
1961- }
1962+ }
1963
1964 def __init__(self, addons_manager):
1965 Gtk.VBox.__init__(self)
1966
1967=== modified file 'softwarecenter/ui/gtk3/views/appview.py'
1968--- softwarecenter/ui/gtk3/views/appview.py 2012-11-23 22:57:21 +0000
1969+++ softwarecenter/ui/gtk3/views/appview.py 2012-11-28 17:42:20 +0000
1970@@ -42,19 +42,20 @@
1971 "application-activated": (GObject.SignalFlags.RUN_LAST,
1972 None,
1973 (GObject.TYPE_PYOBJECT, ),
1974- ),
1975+ ),
1976 "application-selected": (GObject.SignalFlags.RUN_LAST,
1977 None,
1978 (GObject.TYPE_PYOBJECT, ),
1979 ),
1980- }
1981+ }
1982
1983 (INSTALLED_MODE, AVAILABLE_MODE, DIFF_MODE) = range(3)
1984
1985 _SORT_METHOD_INDEX = (SortMethods.BY_ALPHABET,
1986 SortMethods.BY_TOP_RATED,
1987 SortMethods.BY_CATALOGED_TIME,
1988- SortMethods.BY_SEARCH_RANKING,)
1989+ SortMethods.BY_SEARCH_RANKING,
1990+ )
1991
1992 # indices that relate to the above tuple
1993 _SORT_BY_ALPHABET = 0
1994
1995=== modified file 'softwarecenter/ui/gtk3/views/catview.py'
1996--- softwarecenter/ui/gtk3/views/catview.py 2012-11-23 22:57:21 +0000
1997+++ softwarecenter/ui/gtk3/views/catview.py 2012-11-28 17:42:20 +0000
1998@@ -36,17 +36,18 @@
1999 from softwarecenter.ui.gtk3.models.appstore2 import AppPropertiesHelper
2000 from softwarecenter.ui.gtk3.widgets.viewport import Viewport
2001 from softwarecenter.ui.gtk3.widgets.containers import (
2002- FramedHeaderBox,
2003- FramedBox,
2004- TileGrid)
2005+ FramedHeaderBox,
2006+ FramedBox,
2007+ TileGrid)
2008 from softwarecenter.ui.gtk3.widgets.recommendations import (
2009- RecommendationsPanelCategory)
2010+ RecommendationsPanelCategory)
2011 from softwarecenter.ui.gtk3.widgets.buttons import CategoryTile
2012 from softwarecenter.ui.gtk3.em import StockEms
2013 from softwarecenter.db.appfilter import AppFilter, get_global_filter
2014 from softwarecenter.db.enquire import AppEnquire
2015-from softwarecenter.db.categories import (Category,
2016- categories_sorted_by_name)
2017+from softwarecenter.db.categories import (
2018+ Category,
2019+ categories_sorted_by_name)
2020 from softwarecenter.distro import get_distro
2021
2022 LOG = logging.getLogger(__name__)
2023@@ -61,17 +62,17 @@
2024 "category-selected": (GObject.SignalFlags.RUN_LAST,
2025 None,
2026 (GObject.TYPE_PYOBJECT, ),
2027- ),
2028+ ),
2029
2030 "application-activated": (GObject.SignalFlags.RUN_LAST,
2031 None,
2032 (GObject.TYPE_PYOBJECT, ),
2033- ),
2034+ ),
2035
2036 "show-category-applist": (GObject.SignalFlags.RUN_LAST,
2037 None,
2038 (),)
2039- }
2040+ }
2041
2042 SPACING = PADDING = 3
2043
2044
2045=== modified file 'softwarecenter/ui/gtk3/views/purchaseview.py'
2046--- softwarecenter/ui/gtk3/views/purchaseview.py 2012-09-18 20:14:56 +0000
2047+++ softwarecenter/ui/gtk3/views/purchaseview.py 2012-11-28 17:42:20 +0000
2048@@ -80,21 +80,21 @@
2049 """ % _("Connecting to payment service...")
2050
2051 __gsignals__ = {
2052- 'purchase-succeeded': (GObject.SignalFlags.RUN_LAST,
2053- None,
2054- ()),
2055- 'purchase-failed': (GObject.SignalFlags.RUN_LAST,
2056- None,
2057- ()),
2058- 'purchase-cancelled-by-user': (GObject.SignalFlags.RUN_LAST,
2059- None,
2060- ()),
2061- 'terms-of-service-declined': (GObject.SignalFlags.RUN_LAST,
2062+ 'purchase-succeeded': (GObject.SignalFlags.RUN_LAST,
2063+ None,
2064+ ()),
2065+ 'purchase-failed': (GObject.SignalFlags.RUN_LAST,
2066+ None,
2067+ ()),
2068+ 'purchase-cancelled-by-user': (GObject.SignalFlags.RUN_LAST,
2069 None,
2070 ()),
2071- 'purchase-needs-spinner': (GObject.SignalFlags.RUN_LAST,
2072- None,
2073- (bool, )),
2074+ 'terms-of-service-declined': (GObject.SignalFlags.RUN_LAST,
2075+ None,
2076+ ()),
2077+ 'purchase-needs-spinner': (GObject.SignalFlags.RUN_LAST,
2078+ None,
2079+ (bool, )),
2080
2081 }
2082
2083@@ -357,7 +357,7 @@
2084 '\a': 'Down', # fake
2085 ' ': 'space',
2086 '\v': 'Page_Down', # fake
2087- }
2088+ }
2089
2090 for key in s:
2091 event = Gdk.Event(Gdk.KEY_PRESS)
2092@@ -383,7 +383,7 @@
2093 ('enter-payment', 'Confirm Payment Details', PAYMENT_DETAILS),
2094 ('confirm-payment', 'title-the-same-as-before', '\t\n'),
2095 ('end-state', 'no-title', ''),
2096- ]
2097+ ]
2098
2099
2100 def _generate_events(view):
2101
2102=== modified file 'softwarecenter/ui/gtk3/widgets/buttons.py'
2103--- softwarecenter/ui/gtk3/widgets/buttons.py 2012-10-09 12:40:55 +0000
2104+++ softwarecenter/ui/gtk3/widgets/buttons.py 2012-11-28 17:42:20 +0000
2105@@ -544,7 +544,7 @@
2106 "clicked": (GObject.SignalFlags.RUN_LAST,
2107 None,
2108 (),)
2109- }
2110+ }
2111
2112 def __init__(self, markup="", uri="none"):
2113 Gtk.Label.__init__(self)
2114
2115=== modified file 'softwarecenter/ui/gtk3/widgets/containers.py'
2116--- softwarecenter/ui/gtk3/widgets/containers.py 2012-10-05 03:34:26 +0000
2117+++ softwarecenter/ui/gtk3/widgets/containers.py 2012-11-28 17:42:20 +0000
2118@@ -196,8 +196,8 @@
2119 "application-activated": (GObject.SignalFlags.RUN_LAST,
2120 None,
2121 (GObject.TYPE_PYOBJECT, ),
2122- ),
2123- }
2124+ ),
2125+ }
2126
2127 def add_tiles(self, properties_helper, docs, amount):
2128 '''Adds application tiles to an ApplicationTileGrid:
2129
2130=== modified file 'softwarecenter/ui/gtk3/widgets/exhibits.py'
2131--- softwarecenter/ui/gtk3/widgets/exhibits.py 2012-11-23 22:57:21 +0000
2132+++ softwarecenter/ui/gtk3/widgets/exhibits.py 2012-11-28 17:42:20 +0000
2133@@ -106,8 +106,8 @@
2134 "render-finished": (GObject.SignalFlags.RUN_LAST,
2135 None,
2136 (),
2137- )
2138- }
2139+ )
2140+ }
2141
2142 def __init__(self):
2143 Gtk.OffscreenWindow.__init__(self)
2144@@ -261,8 +261,8 @@
2145 "show-exhibits-clicked": (GObject.SignalFlags.RUN_LAST,
2146 None,
2147 (GObject.TYPE_PYOBJECT,),
2148- )
2149- }
2150+ )
2151+ }
2152
2153 DROPSHADOW_HEIGHT = 11
2154 MAX_HEIGHT = 200 # pixels
2155
2156=== modified file 'softwarecenter/ui/gtk3/widgets/imagedialog.py'
2157--- softwarecenter/ui/gtk3/widgets/imagedialog.py 2012-11-23 22:57:21 +0000
2158+++ softwarecenter/ui/gtk3/widgets/imagedialog.py 2012-11-28 17:42:20 +0000
2159@@ -76,5 +76,5 @@
2160 # pixbuf
2161 d = SimpleShowImageDialog("Synaptic Screenshot",
2162 GdkPixbuf.Pixbuf.new_from_file(
2163- "/usr/share/software-center/default_banner/fallback.png"))
2164+ "/usr/share/software-center/default_banner/fallback.png"))
2165 d.run()
2166
2167=== modified file 'softwarecenter/ui/gtk3/widgets/labels.py'
2168--- softwarecenter/ui/gtk3/widgets/labels.py 2012-10-04 20:59:35 +0000
2169+++ softwarecenter/ui/gtk3/widgets/labels.py 2012-11-28 17:42:20 +0000
2170@@ -76,7 +76,7 @@
2171 # the %s in "label_text" will cause str() to be called on the
2172 # encoded string, but it will not know what encoding to use
2173 "hardware": unicode(short_descr, "utf8", "ignore")
2174- }
2175+ }
2176 return label_text
2177
2178 def set_hardware_requirement(self, tag, result):
2179
2180=== modified file 'softwarecenter/ui/gtk3/widgets/oneconfviews.py'
2181--- softwarecenter/ui/gtk3/widgets/oneconfviews.py 2012-05-30 18:39:55 +0000
2182+++ softwarecenter/ui/gtk3/widgets/oneconfviews.py 2012-11-28 17:42:20 +0000
2183@@ -28,11 +28,11 @@
2184 "computer-changed": (GObject.SIGNAL_RUN_LAST,
2185 GObject.TYPE_NONE,
2186 (GObject.TYPE_PYOBJECT, GObject.TYPE_PYOBJECT),
2187- ),
2188+ ),
2189 "current-inventory-refreshed": (GObject.SIGNAL_RUN_LAST,
2190 GObject.TYPE_NONE,
2191 (),
2192- ),
2193+ ),
2194 }
2195
2196 (COL_ICON, COL_HOSTID, COL_HOSTNAME) = range(3)
2197
2198=== modified file 'softwarecenter/ui/gtk3/widgets/recommendations.py'
2199--- softwarecenter/ui/gtk3/widgets/recommendations.py 2012-11-23 22:57:21 +0000
2200+++ softwarecenter/ui/gtk3/widgets/recommendations.py 2012-11-28 17:42:20 +0000
2201@@ -38,7 +38,7 @@
2202 SOFTWARE_CENTER_NAME_KEYRING,
2203 RecommenderFeedbackActions,
2204 TransactionTypes,
2205- )
2206+)
2207 from softwarecenter.utils import utf8
2208 from softwarecenter.netstatus import network_state_is_connected
2209
2210@@ -54,8 +54,8 @@
2211 "application-activated": (GObject.SIGNAL_RUN_LAST,
2212 GObject.TYPE_NONE,
2213 (GObject.TYPE_PYOBJECT,),
2214- ),
2215- }
2216+ ),
2217+ }
2218
2219 def __init__(self):
2220 FramedHeaderBox.__init__(self)
2221@@ -124,8 +124,8 @@
2222 "more-button-clicked": (GObject.SignalFlags.RUN_LAST,
2223 None,
2224 (GObject.TYPE_PYOBJECT, ),
2225- ),
2226- }
2227+ ),
2228+ }
2229
2230 def __init__(self, db, properties_helper, subcategory):
2231 RecommendationsPanel.__init__(self)
2232@@ -195,12 +195,12 @@
2233 "recommendations-opt-in": (GObject.SIGNAL_RUN_LAST,
2234 GObject.TYPE_NONE,
2235 (),
2236- ),
2237+ ),
2238 "recommendations-opt-out": (GObject.SIGNAL_RUN_LAST,
2239 GObject.TYPE_NONE,
2240 (),
2241- ),
2242- }
2243+ ),
2244+ }
2245
2246 TURN_ON_RECOMMENDATIONS_TEXT = _(u"Turn On Recommendations")
2247 RECOMMENDATIONS_OPT_IN_TEXT = _(u"To make recommendations, "
2248
2249=== modified file 'softwarecenter/ui/gtk3/widgets/reviews.py'
2250--- softwarecenter/ui/gtk3/widgets/reviews.py 2012-11-23 22:57:21 +0000
2251+++ softwarecenter/ui/gtk3/widgets/reviews.py 2012-11-28 17:42:20 +0000
2252@@ -36,22 +36,19 @@
2253 upstream_version_compare,
2254 upstream_version,
2255 utf8,
2256- )
2257-
2258-
2259+)
2260 from softwarecenter.i18n import (
2261 get_languages,
2262 langcode_to_name,
2263- )
2264-
2265+)
2266 from softwarecenter.netstatus import (
2267 network_state_is_connected,
2268 get_network_watcher,
2269- )
2270+)
2271 from softwarecenter.enums import (
2272 PkgStates,
2273 ReviewSortMethods,
2274- )
2275+)
2276
2277 from softwarecenter.backend.reviews import UsefulnessCache
2278
2279@@ -626,14 +623,14 @@
2280 # default string
2281 version_string = _("For version %(version)s") % {
2282 'version': version,
2283- }
2284+ }
2285 # If its for the same version, show it as such
2286 if (review_version and
2287 app_version and
2288 upstream_version_compare(review_version, app_version) == 0):
2289 version_string = _("For this version (%(version)s)") % {
2290 'version': version,
2291- }
2292+ }
2293
2294 m = '<small>%s</small>'
2295 self.version_label.set_markup(m % version_string)
2296@@ -771,7 +768,7 @@
2297 useful_total) % {
2298 'useful_total': useful_total,
2299 'useful_favorable': useful_favorable,
2300- }
2301+ }
2302 else:
2303 # user has not already voted for the review
2304 s = gettext.ngettext(
2305@@ -782,7 +779,7 @@
2306 useful_total) % {
2307 'useful_total': useful_total,
2308 'useful_favorable': useful_favorable,
2309- }
2310+ }
2311 else:
2312 #only display these special strings if the user voted either way
2313 if already_voted:
2314@@ -797,7 +794,7 @@
2315 useful_total) % {
2316 'useful_total': useful_total,
2317 'useful_favorable': useful_favorable,
2318- }
2319+ }
2320 else:
2321 if useful_total == 1:
2322 s = _("You found this review unhelpful.")
2323@@ -810,7 +807,7 @@
2324 useful_total) % {
2325 'useful_total': useful_total,
2326 'useful_favorable': useful_favorable,
2327- }
2328+ }
2329
2330 m = '<small>%s</small>'
2331 label = Gtk.Label()
2332
2333=== modified file 'softwarecenter/ui/gtk3/widgets/stars.py'
2334--- softwarecenter/ui/gtk3/widgets/stars.py 2012-10-05 03:34:26 +0000
2335+++ softwarecenter/ui/gtk3/widgets/stars.py 2012-11-28 17:42:20 +0000
2336@@ -430,7 +430,7 @@
2337 "changed": (GObject.SignalFlags.RUN_LAST,
2338 None,
2339 (),)
2340- }
2341+ }
2342
2343 def __init__(self, size=StarSize.BIG):
2344 Star.__init__(self, size)
2345
2346=== modified file 'softwarecenter/utils.py'
2347--- softwarecenter/utils.py 2012-11-23 22:57:21 +0000
2348+++ softwarecenter/utils.py 2012-11-28 17:42:20 +0000
2349@@ -42,7 +42,7 @@
2350 from paths import (
2351 SOFTWARE_CENTER_CACHE_DIR,
2352 OEM_CHANNEL_DESCRIPTOR,
2353- )
2354+)
2355
2356 from config import get_config
2357
2358@@ -146,7 +146,7 @@
2359 size, resident, share, text, lib, data, dt = f.readline().split()
2360 return {'resident': int(resident),
2361 'data': int(data),
2362- }
2363+ }
2364
2365
2366 def utf8(s):
2367@@ -465,9 +465,9 @@
2368 try:
2369 icon = icons.load_icon(iconname, iconsize, 0)
2370 except Exception as e:
2371- LOG.warning(utf8("could not load icon '%s', displaying missing "
2372- "icon instead: %s ") % (
2373- utf8(iconname), utf8(e.message)))
2374+ LOG.warning(
2375+ utf8("could not load icon '%s', displaying missing "
2376+ "icon instead: %s ") % (utf8(iconname), utf8(e.message)))
2377 icon = icons.load_icon(missingicon, iconsize, 0)
2378 return icon
2379
2380@@ -478,8 +478,7 @@
2381 return the file path of the icon in the theme that corresponds to the
2382 given iconname, or None if it cannot be determined
2383 """
2384- if (not iconname or
2385- not icons.has_icon(iconname)):
2386+ if not iconname or not icons.has_icon(iconname):
2387 iconname = Icons.MISSING_APP
2388 try:
2389 icon_info = icons.lookup_icon(iconname, iconsize, 0)
2390@@ -518,8 +517,8 @@
2391 return installed_desktop_file_path
2392 # files in the extras archive have their desktop filenames prepended
2393 # by "extras-", so we check for that also (LP: #1012877)
2394- extras_desktop_file_path = ("/usr/share/applications/"
2395- "extras-%s.desktop" % pkgname)
2396+ extras_desktop_file_path = \
2397+ "/usr/share/applications/extras-%s.desktop" % pkgname
2398 if os.path.exists(extras_desktop_file_path):
2399 return extras_desktop_file_path
2400 LOG.warn("Could not determine the installed desktop file path for "
2401@@ -536,7 +535,7 @@
2402 DBUS_BUS_NAME,
2403 DBUS_CREDENTIALS_IFACE,
2404 DBUS_CREDENTIALS_PATH,
2405- )
2406+ )
2407 # clean
2408 loop = GObject.MainLoop()
2409 bus = dbus.SessionBus()
2410@@ -609,8 +608,9 @@
2411
2412
2413 def get_nice_size(n_bytes):
2414- nice_size = lambda s: [(s % 1024 ** i and "%.1f" % (s / 1024.0 ** i) or
2415- str(s / 1024 ** i)) + x.strip() for i, x in enumerate(' KMGTPEZY')
2416+ nice_size = lambda s: [
2417+ (s % 1024 ** i and "%.1f" % (s / 1024.0 ** i) or
2418+ str(s / 1024 ** i)) + x.strip() for i, x in enumerate(' KMGTPEZY')
2419 if s < 1024 ** (i + 1) or i == 8][0]
2420 return nice_size(n_bytes)
2421
2422@@ -735,7 +735,7 @@
2423 if os.path.exists(path):
2424 softwarecenter.paths.APP_INSTALL_PATH = './build/share/app-install'
2425 logging.warn("using local APP_INSTALL_PATH: %s" %
2426- softwarecenter.paths.APP_INSTALL_PATH)
2427+ softwarecenter.paths.APP_INSTALL_PATH)
2428 else:
2429 datadir = softwarecenter.paths.datadir
2430 xapian_base_path = softwarecenter.paths.XAPIAN_BASE_PATH
2431@@ -854,7 +854,7 @@
2432 GObject.TYPE_NONE,
2433 (GObject.TYPE_PYOBJECT,
2434 GObject.TYPE_PYOBJECT,),),
2435- }
2436+ }
2437
2438 def __init__(self):
2439 GObject.GObject.__init__(self)
2440@@ -872,8 +872,8 @@
2441 instead a permanent cache dir - no etag or timestamp
2442 checks are performed.
2443 """
2444- self.LOG.debug("download_file: %s %s %s" % (
2445- url, dest_file_path, use_cache))
2446+ self.LOG.debug(
2447+ "download_file: %s %s %s" % (url, dest_file_path, use_cache))
2448
2449 # cancel anything pending to avoid race conditions
2450 # like bug #839462
2451@@ -933,8 +933,8 @@
2452 # self._cancel but self.url/self.dest_file_path will still point to
2453 # the wrong file
2454 if self.url != want_url:
2455- self.LOG.warn("url changed from '%s' to '%s'" % (
2456- want_url, self.url))
2457+ self.LOG.warn(
2458+ "url changed from '%s' to '%s'" % (want_url, self.url))
2459 return False
2460 return True
2461
2462
2463=== modified file 'tests/test_pep8.py'
2464--- tests/test_pep8.py 2012-11-28 15:28:03 +0000
2465+++ tests/test_pep8.py 2012-11-28 17:42:20 +0000
2466@@ -14,7 +14,7 @@
2467 ["pep8",
2468 "--repeat",
2469 # FIXME: FIXME!
2470- "--ignore=E121,E122,E123,E124,E125,E126,E127,E128",
2471+ "--ignore=E125,E126,E127,E128",
2472 os.path.dirname(softwarecenter.__file__),
2473 # test the main binary too
2474 os.path.join(testdir, "..", "software-center"),

Subscribers

People subscribed via source and target branches