~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge loom thread.

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