~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/_pycurl.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-12-13 05:52:27 UTC
  • mfrom: (2180.1.2 revert-missing)
  • Revision ID: pqm@pqm.ubuntu.com-20061213055227-6159e82aef3f15a6
Handle short http reads better.  (Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
253
253
                        _pycurl_errors.CURLE_COULDNT_RESOLVE_PROXY):
254
254
                raise ConnectionError('curl connection error (%s)\non %s'
255
255
                              % (e[1], url))
256
 
            # jam 20060713 The code didn't use to re-raise the exception here
 
256
            elif e[0] == _pycurl_errors.CURLE_PARTIAL_FILE:
 
257
                # Pycurl itself has detected a short read.  We do
 
258
                # not have all the information for the
 
259
                # ShortReadvError, but that should be enough
 
260
                raise errors.ShortReadvError(url,
 
261
                                             offset='unknown', length='unknown',
 
262
                                             actual='unknown',
 
263
                                             extra='Server aborted the request')
 
264
            # jam 20060713 The code didn't use to re-raise the exception here,
257
265
            # but that seemed bogus
258
266
            raise
259
267