2015-08-14 10:12:10 +00:00
|
|
|
#!/usr/bin/env python3
|
2022-04-05 09:13:40 +00:00
|
|
|
import configparser, os
|
2015-08-14 10:12:10 +00:00
|
|
|
|
|
|
|
Config = configparser.ConfigParser( interpolation = configparser.ExtendedInterpolation() )
|
|
|
|
Config.read( "settings.ini" )
|
2016-05-27 16:20:58 +00:00
|
|
|
|
2022-04-05 09:13:40 +00:00
|
|
|
DEBUG = os.getenv( "DEBUG" )
|
|
|
|
if DEBUG is None:
|
|
|
|
DEBUG = Config[ "Env" ][ "Debug" ]
|
|
|
|
else:
|
2022-04-09 12:45:48 +00:00
|
|
|
Config[ "Env" ][ "Debug" ] = str( DEBUG == "1" )
|
2022-04-05 09:13:40 +00:00
|
|
|
|
|
|
|
REDIS_CONN = os.getenv( "REDIS_CONN" )
|
|
|
|
if not REDIS_CONN is None:
|
|
|
|
Config[ "Redis" ][ "ConnStr" ] = REDIS_CONN
|