Merge lp:~dobey/ubuntuone-client/fix-657850-stable into lp:ubuntuone-client/stable-1-4

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 744
Merged at revision: 743
Proposed branch: lp:~dobey/ubuntuone-client/fix-657850-stable
Merge into: lp:ubuntuone-client/stable-1-4
Diff against target: 37 lines (+13/-5)
1 file modified
bin/ubuntuone-preferences (+13/-5)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/fix-657850-stable
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Roman Yepishev (community) fieldtest Approve
Review via email: mp+43977@code.launchpad.net

Commit message

Handle the case when replication is not available but desktopcouch is installed

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

Works great, the services checkboxes are disabled and info is shown properly even if paired_server record is missing in management db.

review: Approve (fieldtest)
Revision history for this message
Natalia Bidart (nataliabidart) :
review: Approve
744. By dobey

Fix the lint issue and log the ValueError

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 2011-01-06 15:52:05 +0000
@@ -702,9 +702,14 @@
702 def connect_desktopcouch_exclusion(self):702 def connect_desktopcouch_exclusion(self):
703 """Hook up to desktopcouch enablement API, or disable the UI."""703 """Hook up to desktopcouch enablement API, or disable the UI."""
704 # Hook up to desktopcouch, or die trying704 # Hook up to desktopcouch, or die trying
705 if dcouch:705 try:
706 if not dcouch:
707 raise ValueError('Replication service not available.')
708
709 # Check bindwood availability
706 Thread(target=self.__check_for_bindwood).start()710 Thread(target=self.__check_for_bindwood).start()
707711
712 # Get the exclusion settings
708 self.dcouch = dcouch.ReplicationExclusion()713 self.dcouch = dcouch.ReplicationExclusion()
709 exclusions = self.dcouch.all_exclusions()714 exclusions = self.dcouch.all_exclusions()
710 for check in [self.bookmarks_check,715 for check in [self.bookmarks_check,
@@ -714,10 +719,13 @@
714 check.set_active(False)719 check.set_active(False)
715 else:720 else:
716 check.set_active(True)721 check.set_active(True)
717 else:722 except ValueError, e:
718 self.bookmarks_check.set_sensitive(False)723 # Replication is not avaialble, so disable the UI
719 self.abook_check.set_sensitive(False)724 for check in [self.bookmarks_check,
720 self.gwib_check.set_sensitive(False)725 self.abook_check,
726 self.gwib_check]:
727 check.set_sensitive(False)
728 logger.error(e)
721729
722 def toggle_db_sync(self, dbname, disable=False):730 def toggle_db_sync(self, dbname, disable=False):
723 """731 """

Subscribers

People subscribed via source and target branches

to all changes: