fix url generated by get_server()
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Tue, 19 Oct 2010 17:38:16 +0000 (13:38 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Tue, 19 Oct 2010 17:38:16 +0000 (13:38 -0400)
sfa/client/sfi.py

index 87579c3..ceb790a 100755 (executable)
@@ -514,7 +514,11 @@ class Sfi:
         """
         Return an instnace of an xmlrpc server connection    
         """
-        url = "http://%s:%s" % (host, port)
+        # port is appended onto the domain, before the path. Should look like:
+        # http://domain:port/path
+        host_parts = host.split('/')
+        host_parts[0] = host_parts[0] + ":" + str(port)
+        url =  "http://%s" %  "/".join(host_parts)    
         return xmlrpcprotocol.get_server(url, keyfile, certfile, self.options)
 
     def get_server_from_opts(self, opts):