@add_auth_token_to_kwargs_from_cli
    def run_and_print(self, args, **kwargs):
        response = self.run(args, **kwargs)
        if response and 'faultstring' in response:
            message = response.get('faultstring', 'Cancellation requested for %s with id %s.' %
                                   (self.resource.get_display_name().lower(), args.id))

        elif response:
            message = '%s with id %s canceled.' % (self.resource.get_display_name().lower(),
                                                   args.id)
        else:
            message = 'Cannot cancel %s with id %s.' % (self.resource.get_display_name().lower(),
                                                        args.id)
        print(message)
dataset/ETHPy150Open StackStorm/st2/st2client/st2client/commands/action.py/ActionExecutionCancelCommand.run_and_print/original