~unity-2d-team/unity-2d/Shell-MultiMonitor

« back to all changes in this revision

Viewing changes to grackle/client.py

  • Committer: Aaron Bentley
  • Date: 2012-01-12 10:05:32 UTC
  • mto: (6.1.30 trunk)
  • mto: This revision was merged to the branch mainline in revision 45.
  • Revision ID: aaron@canonical.com-20120112100532-gljok11rzp7i3y11
TestĀ unsupportedĀ orders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
)
8
8
 
9
9
 
 
10
class UnsupportedOrder(Exception):
 
11
    pass
 
12
 
10
13
 
11
14
class GrackleClient:
12
15
 
53
56
            parameters['order'] = order
54
57
        query = {'parameters': simplejson.dumps(parameters)}
55
58
        response = self._verb_archive('GET', archive_id, query)
 
59
        if response.status == httplib.BAD_REQUEST:
 
60
            raise UnsupportedOrder
56
61
        data = response.read()
57
62
        return simplejson.loads(data)