~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-10-27 15:27:22 UTC
  • mfrom: (2095.2.1 bench_read_bundle_fix)
  • Revision ID: pqm@pqm.ubuntu.com-20061027152722-dff2a8edfddc5f51
(John Arbash Meinel) Fix benchmark imports for bundles

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    errors,
21
21
    urlutils,
22
22
    )
23
 
from bzrlib.bundle.serializer import read_bundle
24
 
from bzrlib.transport import get_transport
 
23
from bzrlib.bundle import serializer as _serializer
 
24
from bzrlib.transport import get_transport as _get_transport
25
25
""")
26
26
 
27
27
 
41
41
    # Some transports cannot detect that we are trying to read a
42
42
    # directory until we actually issue read() on the handle.
43
43
    try:
44
 
        t = get_transport(url)
 
44
        t = _get_transport(url)
45
45
        f = t.get(filename)
46
 
        return read_bundle(f)
 
46
        return _serializer.read_bundle(f)
47
47
    except (errors.TransportError, errors.PathError), e:
48
48
        raise errors.NotABundle(str(e))
49
49
    except (IOError,), e: