Merge lp://qastaging/~sil/desktopcouch/oauth-cloud-pair-records-optional into lp://qastaging/desktopcouch

Proposed by Stuart Langridge
Status: Merged
Approved by: dobey
Approved revision: 66
Merged at revision: not available
Proposed branch: lp://qastaging/~sil/desktopcouch/oauth-cloud-pair-records-optional
Merge into: lp://qastaging/desktopcouch
Diff against target: None lines
To merge this branch: bzr merge lp://qastaging/~sil/desktopcouch/oauth-cloud-pair-records-optional
Reviewer Review Type Date Requested Status
dobey (community) Approve
Chad Miller (community) Approve
Review via email: mp+12052@code.qastaging.launchpad.net

Commit message

Allow cloud paired server records to not have oauth data (because the Ubuntu One record doesn't need it; oauth data is retrieved from the keyring, not from the record).

To post a comment you must log in.
Revision history for this message
Stuart Langridge (sil) wrote :

Allow cloud paired server records to not have oauth data (because the Ubuntu One record doesn't need it; oauth data is retrieved from the keyring, not from the record).

Revision history for this message
Chad Miller (cmiller) wrote :

Perfect.

review: Approve
Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'desktopcouch/pair/couchdb_pairing/couchdb_io.py'
2--- desktopcouch/pair/couchdb_pairing/couchdb_io.py 2009-09-14 16:54:22 +0000
3+++ desktopcouch/pair/couchdb_pairing/couchdb_io.py 2009-09-18 13:18:36 +0000
4@@ -50,13 +50,14 @@
5 "ctime": datetime.datetime.now().strftime("%Y-%m-%d %H:%M"),
6 "record_type": PAIRED_SERVER_RECORD_TYPE,
7 "pairing_identifier": pairing_id,
8- "oauth": {
9+ }
10+ if oauth_data:
11+ data["oauth"] = {
12 "consumer_key": str(oauth_data["consumer_key"]),
13 "consumer_secret": str(oauth_data["consumer_secret"]),
14 "token": str(oauth_data["token"]),
15 "token_secret": str(oauth_data["token_secret"]),
16- },
17- }
18+ }
19 data.update(kwargs)
20 d = _get_db("management", uri=uri)
21 r = Record(data)

Subscribers

People subscribed via source and target branches