contentmatcher/config.py

17 lines
299 B
Python
Raw Normal View History

2022-04-23 22:55:51 +02:00
#!/usr/bin/python3
import os
config_file = '.env.dist'
if os.path.isfile('.env'):
config_file = '.env'
CONFIG = {}
vsebina = []
with open(config_file) as cf:
vsebina = cf.readlines()
for vrstica in vsebina:
key, val = vrstica.split('=', 1)
CONFIG[key] = val.rstrip()