Merge lp:~rodrigo-moya/ubuntuone-client/fix-657850 into lp:ubuntuone-client

Proposed by Rodrigo Moya
Status: Rejected
Rejected by: dobey
Proposed branch: lp:~rodrigo-moya/ubuntuone-client/fix-657850
Merge into: lp:ubuntuone-client
Diff against target: 31 lines (+12/-9)
1 file modified
bin/ubuntuone-preferences (+12/-9)
To merge this branch: bzr merge lp:~rodrigo-moya/ubuntuone-client/fix-657850
Reviewer Review Type Date Requested Status
dobey (community) Needs Fixing
Review via email: mp+38308@code.launchpad.net

Description of the change

Catch exceptions from desktopcouch code

To post a comment you must log in.
Revision history for this message
dobey (dobey) wrote :

We should avoid simply trapping all exceptions here, and this should probably have a test case, so that we can validate that it doesn't regress.

It should only trap an exception for the first two calls which you put inside the try:, and set exclusions = [] inside the except: I think.

review: Needs Fixing

Unmerged revisions

735. By Rodrigo Moya

Catch exceptions from desktopcouch code

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/ubuntuone-preferences'
2--- bin/ubuntuone-preferences 2010-09-21 21:29:07 +0000
3+++ bin/ubuntuone-preferences 2010-10-13 09:54:44 +0000
4@@ -705,15 +705,18 @@
5 if dcouch:
6 Thread(target=self.__check_for_bindwood).start()
7
8- self.dcouch = dcouch.ReplicationExclusion()
9- exclusions = self.dcouch.all_exclusions()
10- for check in [self.bookmarks_check,
11- self.abook_check,
12- self.gwib_check]:
13- if check.get_data('dbname') in exclusions:
14- check.set_active(False)
15- else:
16- check.set_active(True)
17+ try:
18+ self.dcouch = dcouch.ReplicationExclusion()
19+ exclusions = self.dcouch.all_exclusions()
20+ for check in [self.bookmarks_check,
21+ self.abook_check,
22+ self.gwib_check]:
23+ if check.get_data('dbname') in exclusions:
24+ check.set_active(False)
25+ else:
26+ check.set_active(True)
27+ except Exception, e:
28+ logger.error(e)
29 else:
30 self.bookmarks_check.set_sensitive(False)
31 self.abook_check.set_sensitive(False)

Subscribers

People subscribed via source and target branches