~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2008-03-27 06:10:18 UTC
  • mfrom: (3309 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3320.
  • Revision ID: andrew.bennetts@canonical.com-20080327061018-dxztpxyv6yoeg3am
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
514
514
        return ','.join(strings)
515
515
 
516
516
    def send_http_smart_request(self, bytes):
517
 
        code, body_filelike = self._post(bytes)
518
 
        assert code == 200, 'unexpected HTTP response code %r' % (code,)
 
517
        try:
 
518
            code, body_filelike = self._post(bytes)
 
519
            if code != 200:
 
520
                raise InvalidHttpResponse(
 
521
                    self._remote_path('.bzr/smart'),
 
522
                    'Expected 200 response code, got %r' % (code,))
 
523
        except errors.InvalidHttpResponse, e:
 
524
            raise errors.SmartProtocolError(str(e))
519
525
        return body_filelike
520
526
 
521
527