コード例 #1
0
def print_action_list(scripts_folder):
    for check_class in get_check_scripts(scripts_folder):
        check = check_class()
        print "{check_name} - {description}".format(check_name=check.check_name, description=check.description)
コード例 #2
0
def do_check(action, scripts_pattern):
    action = filter(lambda check: check().check_name == action, get_check_scripts(scripts_pattern)) 
    if not action:
        puts(colored.red("This action doesn't exist"))
    else:
        run_action(action[0]())