1
0
Fork 0

move config initialisation to gnuviechadmin.config

* data/dbrepo/versions/002.py use gnuviechadmin.config to read config
   (fixes #37)
 * move config initialization out of bin/gva to make it usable elsewhere
 * add config.py to egg-info
This commit is contained in:
Jan Dittberner 2009-08-02 20:51:24 +02:00
parent 06e1e11a61
commit 33696436a0
6 changed files with 50 additions and 16 deletions

14
bin/gva
View file

@ -21,20 +21,8 @@
#
# Version: $Id$
from paste.deploy import appconfig
from sys import argv
from os import getcwd
from os.path import isfile
from logging.config import fileConfig
from gnuviechadmin.config import config
from gnuviechadmin.cli import CommandLineInterface
if len(argv) > 1 and isfile(argv[1]):
configfile = argv[1]
del argv[1]
else:
configfile = 'development.ini'
config = appconfig('config:%s' % configfile, relative_to=getcwd())
fileConfig(configfile, config)
CommandLineInterface(config, argv).run()