Merge lp:~dobey/ubuntuone-client/fix-576263-stable into lp:ubuntuone-client/stable-1-2

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 513
Merged at revision: 516
Proposed branch: lp:~dobey/ubuntuone-client/fix-576263-stable
Merge into: lp:ubuntuone-client/stable-1-2
Diff against target: 31 lines (+4/-7)
1 file modified
bin/ubuntuone-preferences (+4/-7)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/fix-576263-stable
Reviewer Review Type Date Requested Status
Roman Yepishev (community) Approve
Natalia Bidart (community) Approve
Review via email: mp+26310@code.launchpad.net

Commit message

Avoid opening the error dialog when getting devices list

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

Tests must be provided for this feature.

If this is a backport from trunk, the tests should be backported as well. If there are no tests in trunk for this change, those should be added and then backported.

review: Needs Fixing
Revision history for this message
dobey (dobey) wrote :
Revision history for this message
Natalia Bidart (nataliabidart) :
review: Approve
Revision history for this message
Roman Yepishev (rye) wrote :

Dialog does not appear anymore.
However I will file a bug regarding the actions that should be done by the software if user removes all tokens via the web interface.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/ubuntuone-preferences'
2--- bin/ubuntuone-preferences 2010-04-21 20:33:11 +0000
3+++ bin/ubuntuone-preferences 2010-05-28 14:34:30 +0000
4@@ -332,24 +332,21 @@
5 """
6 Parse the list of devices, and hook up list_devices if it worked.
7 """
8- is_error = False
9 error = None
10 if result and isinstance(result, list):
11 self.devices = result
12 elif isinstance(result, dict):
13 error = result.get('error', None)
14 if not error and result.get('status', None):
15- is_error = True
16 error = result.get('reason', None)
17 else:
18- is_error = True
19+ error = "Invalid response getting devices list."
20 else:
21 error = "Got empty result for devices list."
22- is_error = True
23
24- if is_error:
25- self.devices = None
26- self.error(error)
27+ if error:
28+ self.devices = []
29+ logger.error(error)
30
31 gobject.idle_add(self.list_devices)
32

Subscribers

People subscribed via source and target branches

to all changes: