cleanup
This commit is contained in:
@@ -8,12 +8,13 @@ DEFAULT_CONFIG_FILE_NAME = "config.yml"
|
||||
# else:
|
||||
config_file_to_load = DEFAULT_CONFIG_FILE_NAME
|
||||
|
||||
BASE_FODLER = os.path.dirname(os.path.abspath(__file__))
|
||||
BASE_FOLDER = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
path_to_config = os.path.join(BASE_FODLER, config_file_to_load)
|
||||
path_to_config = os.path.join(BASE_FOLDER, config_file_to_load)
|
||||
print("opening config file " + path_to_config)
|
||||
with open(path_to_config, "r") as ymlfile:
|
||||
cfg = yaml.load(ymlfile, Loader=yaml.FullLoader)
|
||||
with open(path_to_config, "r") as yml_config_file:
|
||||
cfg = yaml.load(yml_config_file, Loader=yaml.FullLoader)
|
||||
|
||||
# read values from config
|
||||
token = cfg["token"]
|
||||
prod_mode = cfg["prod"]
|
||||
|
||||
Reference in New Issue
Block a user