Пример #1
0
    def get_cmd_status(self):
        try:
            status = CommandStatus.get(self.status_id)
        except ResourceNotFound:
            status = CommandStatus()
            status.command = self.command_name
            status._id = self.status_id

        return status
Пример #2
0
    def get_cmd_status():
        try:
            status = CommandStatus.get('episode-slug-status')
        except ResourceNotFound:
            status = CommandStatus()
            status.command = 'Episode-Slug-Update'
            status._id = 'episode-slug-status'

        return status