~didrocks/unity/altf10

« back to all changes in this revision

Viewing changes to grackle/client.py

  • Committer: Curtis Hovey
  • Date: 2012-02-24 21:43:12 UTC
  • Revision ID: curtis.hovey@canonical.com-20120224214312-zlji369uv0l9v75m
Move errors to their own module.
Remove duplicate definiton of SUPPORTED_DISPLAY_TYPES.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
    urlencode,
7
7
)
8
8
 
9
 
 
10
 
class UnparsableDateRange(Exception):
11
 
    """The date_range was not in the format of 2012-01-01..2012-01-31."""
12
 
 
13
 
 
14
 
class UnsupportedDisplayType(Exception):
15
 
    """Raised when an Unsupported display_type is requested."""
16
 
 
17
 
 
18
 
class UnsupportedOrder(Exception):
19
 
    """Raised when an Unsupported order is requested."""
20
 
 
21
 
 
22
 
class MessageIdNotFound(Exception):
23
 
    """No message matching the message_id was found in the archive."""
24
 
 
25
 
 
26
 
SUPPORTED_DISPLAY_TYPES = (
27
 
    'all',
28
 
    'text-only',
29
 
    'headers-only',
 
9
from grackle.error import (
 
10
    UnparsableDateRange,
 
11
    UnsupportedDisplayType,
 
12
    UnsupportedOrder,
30
13
    )
31
14
 
32
15