~didrocks/unity/altf10

« back to all changes in this revision

Viewing changes to grackle/client.py

  • Committer: Curtis Hovey
  • Date: 2012-01-30 21:34:10 UTC
  • mto: This revision was merged to the branch mainline in revision 37.
  • Revision ID: curtis.hovey@canonical.com-20120130213410-2aluhaj4pv807w1e
Use the exception __doc__ to ensure client and server can match exceptions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
        query = {'parameters': simplejson.dumps(parameters)}
124
124
        response = self._method_archive('GET', archive_id, query)
125
125
        if response.status == httplib.BAD_REQUEST:
126
 
            if response.reason == 'Unsupported order':
 
126
            if response.reason == UnsupportedOrder.__doc__:
127
127
                raise UnsupportedOrder
128
 
            elif response.reason == 'Unsupported display_type':
 
128
            elif response.reason == UnsupportedDisplayType.__doc__:
129
129
                raise UnsupportedDisplayType
130
130
            else:
131
131
                raise ValueError('Bad request')