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
=== modified file 'bin/ubuntuone-preferences'
--- bin/ubuntuone-preferences 2010-09-21 21:29:07 +0000
+++ bin/ubuntuone-preferences 2010-10-13 09:54:44 +0000
@@ -705,15 +705,18 @@
705 if dcouch:705 if dcouch:
706 Thread(target=self.__check_for_bindwood).start()706 Thread(target=self.__check_for_bindwood).start()
707707
708 self.dcouch = dcouch.ReplicationExclusion()708 try:
709 exclusions = self.dcouch.all_exclusions()709 self.dcouch = dcouch.ReplicationExclusion()
710 for check in [self.bookmarks_check,710 exclusions = self.dcouch.all_exclusions()
711 self.abook_check,711 for check in [self.bookmarks_check,
712 self.gwib_check]:712 self.abook_check,
713 if check.get_data('dbname') in exclusions:713 self.gwib_check]:
714 check.set_active(False)714 if check.get_data('dbname') in exclusions:
715 else:715 check.set_active(False)
716 check.set_active(True)716 else:
717 check.set_active(True)
718 except Exception, e:
719 logger.error(e)
717 else:720 else:
718 self.bookmarks_check.set_sensitive(False)721 self.bookmarks_check.set_sensitive(False)
719 self.abook_check.set_sensitive(False)722 self.abook_check.set_sensitive(False)

Subscribers

People subscribed via source and target branches