~didrocks/unity/altf10

« back to all changes in this revision

Viewing changes to grackle/store.py

  • Committer: Curtis Hovey
  • Date: 2012-03-16 19:38:35 UTC
  • Revision ID: curtis.hovey@canonical.com-20120316193835-egu5tc1n0xlr5udj
Rename args to be honest about what is expected.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
from urlparse import parse_qs
8
8
 
9
9
from grackle.error import (
10
 
    ArchiveIdExists,
11
10
    ArchiveIdNotFound,
12
11
    MessageIdNotFound,
13
12
    UnparsableDateRange,
82
81
    def is_multipart(message):
83
82
        return isinstance(message['body'], list)
84
83
 
85
 
    def put_archive(self, archive_id, raw_archive=None):
86
 
        # XXX sinzui 2012-02-29: this needs to raise an error
87
 
        # if the th archive_id is invalid, or the raw archive is not mbox.
88
 
        if archive_id in self.message_archives:
89
 
            raise ArchiveIdExists()
90
 
        self.message_archives[archive_id] = []
91
 
 
92
84
    def put_message(self, archive_id, message_id, raw_message):
93
85
        # XXX sinzui 2012-02-29: this needs to raise an error
94
86
        # if the th archive_id is invalid, message_id is not base32