def getConfig(config, key, default):
    """
    Get a value from a configuration dictionary returning a default value
    if the key is not found.
    """
    if key in config:
        return config[key]
    else:
        return default