def check_env_var()

in coll/mc_sim_coll_blog.py [0:0]


def check_env_var(a_var, a_var_name):
    """ Check that an expected environment variable is actually present.

    :param a_var: Variable to be checked
    :param a_var_name: Name of environment variable that should be present
    :return: None; exit program if variable is not present
    """
    if a_var is None:
        print(f"Environment variable {a_var_name} is not present!")
        sys.exit(2)