def set_master_key(): config_object = config.load_config(GLOBAL_CONFIG_FILEPATH) section = "MAPAdmin" if section not in config_object.sections(): config_object.add_section(section) master_key = raw_input("Enter the master key : ") if master_key != "": config_object = config.set_user_items( config_object, section, {"MAPILLARY_SECRET_HASH": master_key}) config.save_config(config_object, GLOBAL_CONFIG_FILEPATH) return master_key