Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (18 sloc) 570 Bytes
import logging
from os import path
import site
import sys
mydir = path.dirname(path.abspath(__file__))
site.addsitedir(mydir)
site.addsitedir(path.join(mydir, 'vendor/lib/python'))
from auslib.web.base import db, app as application
from auslib.config import AUSConfig
cfg = AUSConfig('/etc/aus/admin.ini')
errors = cfg.validate()
if errors:
print >>sys.stderr, "Invalid configuration file:"
for err in errors:
print >>sys.stderr, err
sys.exit(1)
logging.basicConfig(filename=cfg.getLogfile(), level=cfg.getLogLevel())
db.setDburi(cfg.getDburi())