Merge lp:~diegosarmentero/ubuntuone-windows-installer/local-folders-get_info-fail into lp:ubuntuone-windows-installer

Proposed by Diego Sarmentero
Status: Merged
Approved by: Roberto Alsina
Approved revision: 77
Merged at revision: 75
Proposed branch: lp:~diegosarmentero/ubuntuone-windows-installer/local-folders-get_info-fail
Merge into: lp:ubuntuone-windows-installer
Diff against target: 46 lines (+21/-1)
2 files modified
ubuntuone_installer/gui/qt/local_folders.py (+2/-1)
ubuntuone_installer/gui/qt/tests/test_local_folders.py (+19/-0)
To merge this branch: bzr merge lp:~diegosarmentero/ubuntuone-windows-installer/local-folders-get_info-fail
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
Natalia Bidart (community) Approve
Review via email: mp+77718@code.launchpad.net

Commit message

Fixed: LocalFoldersPage.get_info does not hide the overlay on backend error (LP: #828944).

Description of the change

Fixed: LocalFoldersPage.get_info does not hide the overlay on backend error (LP: #828944).

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

ubuntuone_installer/gui/qt/tests/test_local_folders.py:
    301: [C0111, LocalFoldersTestCase.raise_exception] Missing docstring

review: Needs Fixing
76. By Diego Sarmentero

Fixed lint issues and improved get_info

77. By Diego Sarmentero

Added overlay.hide inside finally.

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Looks good!

review: Approve
Revision history for this message
Roberto Alsina (ralsina) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ubuntuone_installer/gui/qt/local_folders.py'
--- ubuntuone_installer/gui/qt/local_folders.py 2011-09-13 02:10:13 +0000
+++ ubuntuone_installer/gui/qt/local_folders.py 2011-09-30 15:43:23 +0000
@@ -160,10 +160,11 @@
160 item = yield self.add_folder(folder_name, validate=True)160 item = yield self.add_folder(folder_name, validate=True)
161 self.timer.start(2000)161 self.timer.start(2000)
162 self.timer.timeout.connect(self.update_sizes)162 self.timer.timeout.connect(self.update_sizes)
163 self.wizard().overlay.hide()
164 self.wizard().currentIdChanged.connect(self.changed_page)163 self.wizard().currentIdChanged.connect(self.changed_page)
165 except:164 except:
166 logger.exception("Error getting backend info:")165 logger.exception("Error getting backend info:")
166 finally:
167 self.wizard().overlay.hide()
167168
168 @QtCore.pyqtSlot("int")169 @QtCore.pyqtSlot("int")
169 @inlineCallbacks170 @inlineCallbacks
170171
=== modified file 'ubuntuone_installer/gui/qt/tests/test_local_folders.py'
--- ubuntuone_installer/gui/qt/tests/test_local_folders.py 2011-09-15 17:49:32 +0000
+++ ubuntuone_installer/gui/qt/tests/test_local_folders.py 2011-09-30 15:43:23 +0000
@@ -292,6 +292,25 @@
292 self.assertEqual(self.ui.ui.folder_list.topLevelItemCount(), 4)292 self.assertEqual(self.ui.ui.folder_list.topLevelItemCount(), 4)
293293
294 @defer.inlineCallbacks294 @defer.inlineCallbacks
295 def test_get_info_not_fail(self):
296 """Check if the overlay is hidden on get_info finish."""
297 self.assertEqual(self.ui.wizard().overlay.hide_counter, 0)
298 yield self.ui.get_info()
299 self.assertEqual(self.ui.wizard().overlay.hide_counter, 1)
300
301 def raise_exception(self):
302 """Raise exception to make the get_info method fail."""
303 raise Exception()
304
305 @defer.inlineCallbacks
306 def test_get_info_fail(self):
307 """Check if the overlay is hidden on fail."""
308 self.patch(self.ui.cp_backend, "volumes_info", self.raise_exception)
309 self.assertEqual(self.ui.wizard().overlay.hide_counter, 0)
310 yield self.ui.get_info()
311 self.assertEqual(self.ui.wizard().overlay.hide_counter, 1)
312
313 @defer.inlineCallbacks
295 def test_subscribed_udf_checked(self):314 def test_subscribed_udf_checked(self):
296 """Check that subscribed UDF items are created correctly."""315 """Check that subscribed UDF items are created correctly."""
297 yield self.ui.get_info()316 yield self.ui.get_info()

Subscribers

People subscribed via source and target branches