diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 331: preserve the port in the dashboard url when building the MemoryAuthBackend for submission

Message ID 20120622012611.1046.17130.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Michael-Doyle Hudson June 22, 2012, 1:26 a.m. UTC
------------------------------------------------------------
revno: 331
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Fri 2012-06-22 13:25:13 +1200
message:
  preserve the port in the dashboard url when building the MemoryAuthBackend for submission
modified:
  lava_dispatcher/actions/launch_control.py


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

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

Patch

=== modified file 'lava_dispatcher/actions/launch_control.py'
--- lava_dispatcher/actions/launch_control.py	2012-05-08 18:05:52 +0000
+++ lava_dispatcher/actions/launch_control.py	2012-06-22 01:25:13 +0000
@@ -47,8 +47,11 @@ 
     auth_backend = MemoryAuthBackend([])
     if parsed_server.username:
         if token:
-            userless_server = '%s://%s%s' % (
-                parsed_server.scheme, parsed_server.hostname, parsed_server.path)
+            userless_server = '%s://%s' % (
+                parsed_server.scheme, parsed_server.hostname)
+            if parsed_server.port:
+                userless_server += ':' + str(parsed_server.port)
+            userless_server += parsed_server.path
             auth_backend = MemoryAuthBackend([(parsed_server.username, userless_server, token)])
         else:
             logging.warn(