~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/server.py

  • Committer: Vincent Ladeuil
  • Date: 2011-02-18 10:33:36 UTC
  • mto: This revision was merged to the branch mainline in revision 5684.
  • Revision ID: v.ladeuil+lp@free.fr-20110218103336-83nx6nqk06ibgqky
Turn the exception about dict option expansion into a warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import errno
20
20
import os.path
21
 
import select
22
21
import socket
23
22
import sys
24
23
import threading
27
26
from bzrlib import (
28
27
    errors,
29
28
    trace,
30
 
    transport,
 
29
    transport as _mod_transport,
31
30
)
32
31
from bzrlib.lazy_import import lazy_import
33
32
lazy_import(globals(), """
34
33
from bzrlib.smart import medium
35
34
from bzrlib.transport import (
36
35
    chroot,
37
 
    get_transport,
38
36
    pathfilter,
39
37
    )
40
38
from bzrlib import (
178
176
 
179
177
    def get_url(self):
180
178
        """Return the url of the server"""
181
 
        return "bzr://%s:%d/" % self._sockname
 
179
        return "bzr://%s:%s/" % (self._sockname[0], self._sockname[1])
182
180
 
183
181
    def serve_conn(self, conn, thread_name_suffix):
184
182
        # For WIN32, where the timeout value from the listening socket
327
325
        chroot_server = chroot.ChrootServer(transport)
328
326
        chroot_server.start_server()
329
327
        self.cleanups.append(chroot_server.stop_server)
330
 
        transport = get_transport(chroot_server.get_url())
 
328
        transport = _mod_transport.get_transport(chroot_server.get_url())
331
329
        if self.base_path is not None:
332
330
            # Decorate the server's backing transport with a filter that can
333
331
            # expand homedirs.
334
332
            expand_userdirs = self._make_expand_userdirs_filter(transport)
335
333
            expand_userdirs.start_server()
336
334
            self.cleanups.append(expand_userdirs.stop_server)
337
 
            transport = get_transport(expand_userdirs.get_url())
 
335
            transport = _mod_transport.get_transport(expand_userdirs.get_url())
338
336
        self.transport = transport
339
337
 
340
338
    def _make_smart_server(self, host, port, inet):