risotto/tests/storage.py

16 lines
400 B
Python
Raw Normal View History

2020-08-19 11:36:18 +02:00
try:
from tiramisu3 import Storage
except:
from tiramisu import Storage
from os.path import isfile as _isfile
import os as _os
_envfile = '/etc/risotto/risotto.conf'
if _isfile(_envfile):
with open(_envfile, 'r') as fh_env:
for line in fh_env.readlines():
key, value = line.strip().split('=')
_os.environ[key] = value
2019-12-26 15:33:51 +01:00
2020-08-19 11:36:18 +02:00
STORAGE = Storage(engine='sqlite3')