def status(self):
        docs = {'updated'  : [],
                'committed': [],
                'to_commit': []}

        row = self.db.internal.find_one({'_id': 'last_sync'})

        if row and 'update' in row:
            for id in row['update']:
                docs['updated'].append(self.get(id, deleted=True))

        if row and 'commit' in row:
            for id in row['commit']:
                docs['committed'].append(self.get(id, deleted=True))

        to_commit =  self.get_docs_to_commit()
        for row in to_commit:
            doc = Document(**row)
            docs['to_commit'].append(doc)
        return docs
def reset(cls):
        cls.info = [
            [
                "Keyboard Control:",
                "  auto repeat:  on    key click percent:  0    LED mask:  00000002",
                "  XKB indicators:",
                "    00: Caps Lock:   off    01: Num Lock:    on     02: Scroll Lock: off",
                "    03: Compose:     off    04: Kana:        off    05: Sleep:       off",
            ],
            [
                "Keyboard Control:",
                "  auto repeat:  on    key click percent:  0    LED mask:  00000002",
                "  XKB indicators:",
                "    00: Caps Lock:   on     01: Num Lock:    on     02: Scroll Lock: off",
                "    03: Compose:     off    04: Kana:        off    05: Sleep:       off",
            ],
        ]
        cls.index = 0
        cls.is_error = False