kiwi-scp/src/kiwi/config.py

16 lines
419 B
Python
Raw Normal View History

2020-08-04 14:52:30 +00:00
class Config:
# version, suffix_project, suffix_down, docker_net, docker_cidr, target_root = None
def __init__(self, filename):
import yaml
with open(filename, 'r') as stream:
try:
print(yaml.safe_load(stream))
except yaml.YAMLError as exc:
print(exc)
@classmethod
def default(cls):
return cls("./etc/default.kiwi.yml")