console/SWSCloudCore/settings.py
2016-04-09 16:52:33 +03:00

19 lines
478 B
Python

# coding: utf-8
import sys
import os
import ConfigParser
default_file = '/etc/sws/cloud/settings.ini'
# default_file = '%s/gocloud.ini' % os.getenv('HOME')
settings_file = os.getenv('CLOUDNS_SETTINGS_FILE', default_file)
# current_path = os.path.dirname(os.path.abspath(__file__))
# setting file read
settings = ConfigParser.ConfigParser()
if os.path.exists(settings_file):
settings.read(settings_file)
else:
sys.exit('settings file not found: %s' % settings_file)