16 lines
380 B
Python
16 lines
380 B
Python
|
#!/usr/bin/env python3
|
||
|
# coding: utf-8
|
||
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
import yaml
|
||
|
|
||
|
|
||
|
class Settings:
|
||
|
def get(self, config):
|
||
|
try:
|
||
|
with open(config, "r") as file:
|
||
|
settings = yaml.load(file, Loader=yaml.FullLoader)
|
||
|
return settings
|
||
|
except yaml.YAMLError as exc:
|
||
|
print("Error in configuration file: {}".format(exc))
|