Beispiel #1
0
def _load_globals_from_config(config_parser):
        # load global variables
        if config_parser.has_section("globals"):
            for key, val in config_parser.items("globals"):
                # globals from top level config get "rank" 1 --
                # overridden by command line files and args
                set_global_var(key, val, 1)
            global_merge_down()
Beispiel #2
0
def _deal_with_cmd_line_globals(options):
    if options.globalvar:
        for var_str in options.globalvar:
            (key, value) = _return_key_val(var_str)
            set_global_var(key, value, 3)

    if options.globalvarfile:
        for filename in options.globalvarfile:
            set_global_var_file(filename, 2)

    # if we add this to the conf file that will go on rank 1
    global_merge_down()