INNER CODE UNIT · Python

get_yaml_files

ahembree/ansible-hms-docker · settings_manager.py:25

def get_yaml_files():
    if not os.path.isdir(YAML_DIR):
        print(f"Directory {YAML_DIR} does not exist!")
        return []
    return [
        os.path.join(YAML_DIR, f)
        for f in os.listdir(YAML_DIR)
        if f.endswith((".yml", ".yaml")) and os.path.isfile(os.path.join(YAML_DIR, f))
    ]

# --- Type-aware value input ---
def input_value(current_value, key_name=None):
    """Get user input matching the type of current_value"""
    # Determine the type
    if current_value is None:
        val_type = str
    elif isinstance(current_value, bool):
        val_type = bool

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…