Commit 0418519d authored by kiran.ak's avatar kiran.ak

initial commit

parents
import configparser
import logging
config = configparser.ConfigParser()
config.read('database.conf')
db_url = config['DB']['db_url'] or 'localhost'
port = int(config['DB']['port']) or 27017
db_name = config['DB']['database_name']
if db_name == '':
logging.critical('Database Name empty.')
collection_name = config['DB']['collection_name']
if collection_name == '':
logging.critical('Collection Name empty.')
site_id = config['SITE']['site_id']
if site_id == '':
logging.critical('Site id empty.')
[DB]
db_url = 192.168.0.220
port = 2717
database_name = ilens_configuration
collection_name = site_conf
[SITE]
site_id = site_142
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment