def save_last_sync(self, ids, process):
        try:
            spec = {'_id': 'last_sync'}
            document = {'$set': {process: ids}}
            self.db.internal.update(spec, document, upsert=True)
        except Exception as e:
            raise DatabaseException(e)
def call_process(cls, cmd):
        if cls.is_error:
            raise subprocess.CalledProcessError(-1, cmd=cmd, output="Couldn't call xset.")

        if cmd[1:] == ["q"]:
            track = cls.info[cls.index]
            output = "\n".join(track)
            return output