Rev 3984: Don't trap a regular ConnectionError when trying to read a mergeable from a url. in http://bzr.arbash-meinel.com/branches/bzr/jam-integration
John Arbash Meinel
john at arbash-meinel.com
Thu Feb 5 20:55:54 GMT 2009
At http://bzr.arbash-meinel.com/branches/bzr/jam-integration
------------------------------------------------------------
revno: 3984
revision-id: john at arbash-meinel.com-20090205205535-pem827po5a2h204o
parent: pqm at pqm.ubuntu.com-20090205110039-w9oelsyvyx160qwy
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Thu 2009-02-05 14:55:35 -0600
message:
Don't trap a regular ConnectionError when trying to read a mergeable from a url.
-------------- next part --------------
=== modified file 'bzrlib/bundle/__init__.py'
--- a/bzrlib/bundle/__init__.py 2008-10-01 05:40:45 +0000
+++ b/bzrlib/bundle/__init__.py 2009-02-05 20:55:35 +0000
@@ -39,14 +39,14 @@
:return: An object supporting get_target_revision. Raises NotABundle if
the target is not a mergeable type.
"""
+ if url.endswith('/'):
+ # A path to a directory was passed in
+ # definitely not a bundle
+ raise errors.NotABundle('A directory cannot be a bundle')
child_transport = get_transport(url,
possible_transports=possible_transports)
transport = child_transport.clone('..')
filename = transport.relpath(child_transport.base)
- if filename.endswith('/'):
- # A path to a directory was passed in
- # definitely not a bundle
- raise errors.NotABundle('A directory cannot be a bundle')
mergeable, transport = read_mergeable_from_transport(transport, filename,
_do_directive)
return mergeable
@@ -80,7 +80,7 @@
return directive, transport
else:
return _serializer.read_bundle(f), transport
- except errors.ConnectionReset:
+ except (errors.ConnectionReset, errors.ConnectionError), e:
raise
except (errors.TransportError, errors.PathError), e:
raise errors.NotABundle(str(e))
More information about the bazaar-commits
mailing list