~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-08-20 05:12:03 UTC
  • mfrom: (4630.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090820051203-riyg1vh31w486hc6
(vila) Fix some more pycurl related karmic test failures

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
# actual code more or less do that, tests should be written to
47
47
# ensure that.
48
48
 
 
49
import errno
49
50
import httplib
50
51
try:
51
52
    import kerberos
541
542
                        request.get_full_url(),
542
543
                        'Bad status line received',
543
544
                        orig_error=exc_val)
 
545
                elif (isinstance(exc_val, socket.error) and len(exc_val.args)
 
546
                      and exc_val.args[0] in (errno.ECONNRESET, 10054)):
 
547
                    raise errors.ConnectionReset(
 
548
                        "Connection lost while sending request.")
544
549
                else:
545
550
                    # All other exception are considered connection related.
546
551