~ubuntu-branches/ubuntu/karmic/bzr/karmic-proposed

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2008-05-12 00:14:54 UTC
  • mfrom: (1.1.42 upstream)
  • Revision ID: james.westby@ubuntu.com-20080512001454-yjpajuiocykl48p9
Tags: 1.5~rc1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
309
309
        # confused
310
310
        Request.__init__(self, 'CONNECT', request.get_full_url(),
311
311
                         connection=request.connection)
312
 
        assert request.proxied_host is not None
 
312
        if request.proxied_host is None:
 
313
            raise AssertionError()
313
314
        self.proxied_host = request.proxied_host
314
315
 
315
316
    def get_selector(self):
502
503
        The request will be retried once if it fails.
503
504
        """
504
505
        connection = request.connection
505
 
        assert connection is not None, \
506
 
            'Cannot process a request without a connection'
 
506
        if connection is None:
 
507
            raise AssertionError(
 
508
                'Cannot process a request without a connection')
507
509
 
508
510
        # Get all the headers
509
511
        headers = {}
595
597
 
596
598
    def https_open(self, request):
597
599
        connection = request.connection
598
 
        assert isinstance(connection, HTTPSConnection)
599
600
        if connection.sock is None and \
600
601
                connection.proxied_host is not None and \
601
602
                request.get_method() != 'CONNECT' : # Don't loop