Merge lp:~nataliabidart/u1sync/no-more-oauth into lp:~facundo/u1sync/opensourcing

Proposed by Natalia Bidart
Status: Merged
Merged at revision: 10
Proposed branch: lp:~nataliabidart/u1sync/no-more-oauth
Merge into: lp:~facundo/u1sync/opensourcing
Diff against target: 68 lines (+0/-26)
2 files modified
man/u1sync.1 (+0/-3)
u1sync/main.py (+0/-23)
To merge this branch: bzr merge lp:~nataliabidart/u1sync/no-more-oauth
Reviewer Review Type Date Requested Status
Facundo Batista Pending
Review via email: mp+268150@code.launchpad.net

Commit message

- No more oauth options for u1sync, since is no longer used.

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

Confirmed tests pass on magicicada-server using this revno for the u1sync branch.

The key that tests keep working is that test_sync uses:

    def _u1sync_client(self):
        """Create a u1sync client instance."""
        client = u1sync.client.Client()
        client.connect_ssl("localhost", self.ssl_port, True)
        client.set_capabilities()
        auth_info = self.access_tokens['jack']
        client.simple_auth(auth_info['username'], auth_info['password'])
        return client

so the oauth option is never really used.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'man/u1sync.1'
2--- man/u1sync.1 2011-02-09 14:58:35 +0000
3+++ man/u1sync.1 2015-08-14 22:22:59 +0000
4@@ -97,9 +97,6 @@
5 \fB\-\-list\-shares\fR
6 lists available shares
7 .TP
8-\fB\-\-oauth\fR=\fIKEY\fR:\fISECRET\fR
9-explicitly specify an OAuth token to use rather than querying the keyring
10-.TP
11 \fB\-\-port\fR=\fIPORT\fR
12 specify a non-default port to connect to
13 .TP
14
15=== modified file 'u1sync/main.py'
16--- u1sync/main.py 2011-02-09 14:58:35 +0000
17+++ u1sync/main.py 2015-08-14 22:22:59 +0000
18@@ -35,7 +35,6 @@
19 from twisted.internet import reactor
20 from Queue import Queue
21
22-from oauth.oauth import OAuthToken, OAuthConsumer
23 import ubuntuone.storageprotocol.dircontent_pb2 as dircontent_pb2
24 from ubuntuone.storageprotocol.dircontent_pb2 import DIRECTORY, SYMLINK
25 from u1sync.genericmerge import (
26@@ -293,12 +292,6 @@
27 default='fs-1.one.ubuntu.com',
28 help="The server address")
29
30- oauth_meta_var = "[CONSUMER_KEY:CONSUMER_SECRET:]KEY:SECRET"
31- oauth_help = "Explicitly provide OAuth credentials. You can either " \
32- "provide the 4 values (consumer key and secret, plus the " \
33- "key and secret), or just the last two (key and secret)."
34- parser.add_option("--oauth", dest="oauth", metavar=oauth_meta_var,
35- help=oauth_help)
36 action_list = ", ".join(sorted(MERGE_ACTIONS.keys()))
37 parser.add_option("--action", dest="action", metavar="ACTION",
38 default=None,
39@@ -372,21 +365,6 @@
40 options.action = DEFAULT_MERGE_ACTION
41
42
43- token = None
44- consumer = None
45- if options.oauth is None:
46- parser.error("--oauth is required")
47- else:
48- values = options.oauth.split(':')
49- if len(values) == 4:
50- (consumer_key, consumer_secret, key, secret) = values
51- consumer = OAuthConsumer(consumer_key, consumer_secret)
52- elif len(values) == 2:
53- (key, secret) = values
54- else:
55- parser.error("--oauth requires %s" % oauth_meta_var)
56- token = OAuthToken(key, secret)
57-
58 if options.share is not None:
59 try:
60 uuid.UUID(options.share)
61@@ -407,7 +385,6 @@
62
63 try:
64 client.set_capabilities()
65- client.oauth_from_token(token, consumer)
66
67 if options.mode == "sync":
68 do_sync(client=client, directory=directory,

Subscribers

People subscribed via source and target branches