Merge lp:~dobey/ubuntuone-client/signature-dict into lp:ubuntuone-client

Proposed by dobey on 2012-05-23
Status: Rejected
Rejected by: Manuel de la Peña on 2012-05-28
Proposed branch: lp:~dobey/ubuntuone-client/signature-dict
Merge into: lp:ubuntuone-client
Diff against target: 42 lines (+8/-3)
1 file modified
ubuntuone/platform/credentials/linux.py (+8/-3)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/signature-dict
Reviewer Review Type Date Requested Status
Manuel de la Peña (community) Disapprove on 2012-05-28
Alejandro J. Cura (community) Needs Fixing on 2012-05-24
Roberto Alsina (community) 2012-05-23 Approve on 2012-05-23
Review via email: mp+107043@code.launchpad.net

Commit Message

Use dbus.Dictionary to specify signature when using empty dicts for SSO calls

To post a comment you must log in.
Roberto Alsina (ralsina) wrote :

+1

review: Approve
Alejandro J. Cura (alecu) wrote :

Please add some tests!

review: Needs Fixing
dobey (dobey) wrote :

Alejandro, can you please tell me how to add additional tests, which don't involve rewriting the complete set of credentials dbus tests, or duplicating most of the testcases there, in order to add 3 simple tests? I don't want to spend 3 days refactoring the tests to be able to add 3 very small tests.

Manuel de la Peña (mandel) wrote :

I'm rejecting it because MP https://code.launchpad.net/~alecu/ubuntuone-client/signature-dict/+merge/107265 does the same and has tests.

review: Disapprove

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/platform/credentials/linux.py'
2--- ubuntuone/platform/credentials/linux.py 2012-04-09 20:07:05 +0000
3+++ ubuntuone/platform/credentials/linux.py 2012-05-23 15:31:33 +0000
4@@ -30,6 +30,7 @@
5 # files in the program, then also delete it here.
6 """Ubuntu One credentials management dbus service."""
7
8+import dbus
9 import dbus.service
10 import ubuntu_sso
11
12@@ -181,7 +182,8 @@
13 def find_credentials(self, reply_handler=NO_OP, error_handler=NO_OP):
14 """Ask the Ubuntu One credentials."""
15 self.ref_count += 1
16- self.sso_proxy.find_credentials(APP_NAME, {},
17+ self.sso_proxy.find_credentials(APP_NAME,
18+ dbus.Dictionary({}, signature='ss'),
19 reply_handler=reply_handler, error_handler=error_handler)
20
21 @dbus.service.method(dbus_interface=DBUS_CREDENTIALS_IFACE,
22@@ -205,7 +207,9 @@
23 self.ref_count -= 1
24
25 self.ref_count += 1
26- self.sso_proxy.find_credentials_sync(APP_NAME, {},
27+ self.sso_proxy.find_credentials_sync(
28+ APP_NAME,
29+ dbus.Dictionary({}, signature='ss'),
30 reply_handler=decrease_counter_success,
31 error_handler=decrease_counter_error)
32
33@@ -214,7 +218,8 @@
34 def clear_credentials(self, reply_handler=NO_OP, error_handler=NO_OP):
35 """Clear the Ubuntu One credentials."""
36 self.ref_count += 1
37- self.sso_proxy.clear_credentials(APP_NAME, {},
38+ self.sso_proxy.clear_credentials(APP_NAME,
39+ dbus.Dictionary({}, signature='ss'),
40 reply_handler=reply_handler, error_handler=error_handler)
41
42 @dbus.service.method(dbus_interface=DBUS_CREDENTIALS_IFACE,

Subscribers

People subscribed via source and target branches