~hudson-openstack/burrow/trunk

« back to all changes in this revision

Viewing changes to burrow/backend/http.py

  • Committer: Tarmac
  • Author(s): Eric Day
  • Date: 2011-08-24 20:23:03 UTC
  • mfrom: (33.1.7 doc-updates)
  • Revision ID: tarmac-20110824202303-fc09r0aendi1tn6m
Added client API unit tests, moved exceptions to main burrow module, and added more WSGI frontend tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
                        yield item
146
146
                    return
147
147
            yield body
 
148
        body = response.read()
 
149
        if body == '':
 
150
            body = response.reason
148
151
        if response.status == 400:
149
 
            raise burrow.backend.InvalidArguments(response.reason)
 
152
            raise burrow.InvalidArguments(body)
150
153
        if response.status == 404:
151
 
            raise burrow.backend.NotFound()
 
154
            raise burrow.NotFound(body)
152
155
        raise Exception(response.reason)