diff mbox

[Branch,~linaro-validation/lava-tool/trunk] Rev 155: oops * 2

Message ID 20110617044123.7556.95402.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

Michael-Doyle Hudson June 17, 2011, 4:41 a.m. UTC
------------------------------------------------------------
revno: 155
committer: Michael-Doyle Hudson <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Fri 2011-06-17 16:35:17 +1200
message:
  oops * 2
modified:
  lava_tool/commands/auth.py


--
lp:lava-tool
https://code.launchpad.net/~linaro-validation/lava-tool/trunk

You are subscribed to branch lp:lava-tool.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-tool/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_tool/commands/auth.py'
--- lava_tool/commands/auth.py	2011-06-14 01:30:55 +0000
+++ lava_tool/commands/auth.py	2011-06-17 04:35:17 +0000
@@ -99,10 +99,12 @@ 
             else:
                 token = getpass.getpass("Paste token for %s: " % uri)
 
+        userless_uri = '%s://%s%s' % (parsed_host.scheme, host, parsed_host.path)
+
         if not self.args.no_check:
             sp = AuthenticatingServerProxy(
                 uri, auth_backend=MemoryAuthBackend(
-                    [(username, host, token)]))
+                    [(username, userless_uri, token)]))
             try:
                 token_user = sp.system.whoami()
             except xmlrpclib.ProtocolError as ex:
@@ -119,7 +121,6 @@ 
                     "whoami() returned %s rather than expected %s -- this is "
                     "a bug." % (token_user, username))
 
-        userless_uri = '%s://%s%s' % (parsed_host.scheme, host, parsed_host.path)
         self.auth_backend.add_token(username, userless_uri, token)
 
         print 'Token added successfully for user %s.' % username