Merge lp:~diegosarmentero/ubuntuone-control-panel/current-device-removed into lp:ubuntuone-control-panel

Proposed by Diego Sarmentero
Status: Merged
Approved by: Alejandro J. Cura
Approved revision: 310
Merge reported by: dobey
Merged at revision: not available
Proposed branch: lp:~diegosarmentero/ubuntuone-control-panel/current-device-removed
Merge into: lp:ubuntuone-control-panel
Diff against target: 27 lines (+3/-0)
2 files modified
ubuntuone/controlpanel/gui/qt/controlpanel.py (+1/-0)
ubuntuone/controlpanel/gui/qt/tests/test_controlpanel.py (+2/-0)
To merge this branch: bzr merge lp:~diegosarmentero/ubuntuone-control-panel/current-device-removed
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
dobey (community) Approve
Roberto Alsina (community) Approve
Review via email: mp+101432@code.launchpad.net

Commit message

- Restarting the wizard on current device removed (LP: #973830).

Description of the change

Currently was showing the wizard in the last page shown, which in this case tries to get the web folders, but after the current device removed, couldn't perform that operation because it doesn't have credentials.

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

+1

review: Approve
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
Alejandro J. Cura (alecu) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ubuntuone/controlpanel/gui/qt/controlpanel.py'
--- ubuntuone/controlpanel/gui/qt/controlpanel.py 2012-03-30 17:34:33 +0000
+++ ubuntuone/controlpanel/gui/qt/controlpanel.py 2012-04-10 19:18:18 +0000
@@ -93,6 +93,7 @@
93 @log_call(logger.debug)93 @log_call(logger.debug)
94 def on_credentials_not_found(self):94 def on_credentials_not_found(self):
95 """Credentials are not found or were removed."""95 """Credentials are not found or were removed."""
96 self.ui.wizard.restart()
96 self.ui.switcher.setCurrentWidget(self.ui.wizard)97 self.ui.switcher.setCurrentWidget(self.ui.wizard)
97 self.is_processing = False98 self.is_processing = False
9899
99100
=== modified file 'ubuntuone/controlpanel/gui/qt/tests/test_controlpanel.py'
--- ubuntuone/controlpanel/gui/qt/tests/test_controlpanel.py 2012-03-26 21:00:47 +0000
+++ ubuntuone/controlpanel/gui/qt/tests/test_controlpanel.py 2012-04-10 19:18:18 +0000
@@ -68,9 +68,11 @@
6868
69 def test_on_credentials_not_found(self):69 def test_on_credentials_not_found(self):
70 """The wizard panel is shown."""70 """The wizard panel is shown."""
71 self.patch(self.ui.ui.wizard, 'restart', self._set_called)
71 self.ui.on_credentials_found()72 self.ui.on_credentials_found()
72 self.ui.on_credentials_not_found()73 self.ui.on_credentials_not_found()
73 self.assertIs(self.ui.ui.switcher.currentWidget(), self.ui.ui.wizard)74 self.assertIs(self.ui.ui.switcher.currentWidget(), self.ui.ui.wizard)
75 self.assertEqual(self._called, ((), {}))
7476
75 @defer.inlineCallbacks77 @defer.inlineCallbacks
76 def test_on_credentials_found_called(self):78 def test_on_credentials_found_called(self):

Subscribers

People subscribed via source and target branches