~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-27 15:15:40 UTC
  • mto: This revision was merged to the branch mainline in revision 2097.
  • Revision ID: john@arbash-meinel.com-20061027151540-1fe5a39f40355478
Fix imports for bundles.

bundle benchmarks were importing read_bundle from the wrong place.
Fix them, and change imports to avoid people accidentally doing
that in the future.

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: