~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/__init__.py

Move doctest import to increase speed

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
from bzrlib.bundle.serializer import read_bundle
18
17
import bzrlib.errors as errors
19
18
import bzrlib.urlutils
20
19
import bzrlib.transport
 
20
import bzrlib.bundle.read_bundle
21
21
 
22
22
 
23
23
def read_bundle_from_url(url):
38
38
    try:
39
39
        t = bzrlib.transport.get_transport(url)
40
40
        f = t.get(filename)
41
 
        return read_bundle(f)
 
41
        return bzrlib.bundle.read_bundle.BundleReader(f)
42
42
    except (errors.TransportError, errors.PathError), e:
43
43
        raise errors.NotABundle(str(e))
44
44