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
1=== modified file 'ubuntuone/controlpanel/gui/qt/controlpanel.py'
2--- ubuntuone/controlpanel/gui/qt/controlpanel.py 2012-03-30 17:34:33 +0000
3+++ ubuntuone/controlpanel/gui/qt/controlpanel.py 2012-04-10 19:18:18 +0000
4@@ -93,6 +93,7 @@
5 @log_call(logger.debug)
6 def on_credentials_not_found(self):
7 """Credentials are not found or were removed."""
8+ self.ui.wizard.restart()
9 self.ui.switcher.setCurrentWidget(self.ui.wizard)
10 self.is_processing = False
11
12
13=== modified file 'ubuntuone/controlpanel/gui/qt/tests/test_controlpanel.py'
14--- ubuntuone/controlpanel/gui/qt/tests/test_controlpanel.py 2012-03-26 21:00:47 +0000
15+++ ubuntuone/controlpanel/gui/qt/tests/test_controlpanel.py 2012-04-10 19:18:18 +0000
16@@ -68,9 +68,11 @@
17
18 def test_on_credentials_not_found(self):
19 """The wizard panel is shown."""
20+ self.patch(self.ui.ui.wizard, 'restart', self._set_called)
21 self.ui.on_credentials_found()
22 self.ui.on_credentials_not_found()
23 self.assertIs(self.ui.ui.switcher.currentWidget(), self.ui.ui.wizard)
24+ self.assertEqual(self._called, ((), {}))
25
26 @defer.inlineCallbacks
27 def test_on_credentials_found_called(self):

Subscribers

People subscribed via source and target branches