Merge lp:~chipaca/ubuntuone-client/fix-u1prefs-self-removal into lp:ubuntuone-client

Proposed by John Lenton
Status: Merged
Approved by: Alejandro J. Cura
Approved revision: 715
Merged at revision: 716
Proposed branch: lp:~chipaca/ubuntuone-client/fix-u1prefs-self-removal
Merge into: lp:ubuntuone-client
Diff against target: 26 lines (+4/-4)
2 files modified
bin/ubuntuone-preferences (+1/-1)
ubuntuone/api/restclient.py (+3/-3)
To merge this branch: bzr merge lp:~chipaca/ubuntuone-client/fix-u1prefs-self-removal
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
Matt Griffin (community) Approve
Review via email: mp+36220@code.launchpad.net

Commit message

correctly stringify http errors that occur in restclient (in another process), and fix the call to bus.get_object in the case of removing the current machine's token.

Description of the change

correctly stringify http errors that occur in restclient (in another process), and fix the call to bus.get_object in the case of removing the current machine's token.

To post a comment you must log in.
Revision history for this message
Matt Griffin (mattgriffin) wrote :

Tested and my devices are removed without error (including your current device). I'd like it to clear the Account tab info as well but I'd also like to eat ice cream at every meal... so I guess you can't have it all.
Approved :)

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

We'll have Ice Cream for every meal for N! :-)

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-09-16 13:08:33 +0000
3+++ bin/ubuntuone-preferences 2010-09-21 21:46:03 +0000
4@@ -464,7 +464,7 @@
5
6 if token == oauth_token.key:
7 try:
8- client = self.bus.get_object(DBUS_IFACE_CRED_NAME,
9+ client = self.bus.get_object(DBUS_BUS_NAME,
10 DBUS_CRED_PATH,
11 follow_name_owner_changes=True)
12 iface = dbus.Interface(client, DBUS_IFACE_CRED_NAME)
13
14=== modified file 'ubuntuone/api/restclient.py'
15--- ubuntuone/api/restclient.py 2010-09-13 13:32:04 +0000
16+++ ubuntuone/api/restclient.py 2010-09-21 21:46:03 +0000
17@@ -68,6 +68,6 @@
18 return simplejson.loads(data)
19
20 except urllib2.HTTPError, e:
21- print e
22- return {'error' : e}
23-
24+ # the error is not pickle-able, so str() it
25+ return {'error' : str(e)}
26+

Subscribers

People subscribed via source and target branches