1
0
Fork 0

some pylint fixes (addresses #24)

This commit is contained in:
Jan Dittberner 2009-08-02 22:00:13 +02:00
parent ccaa207d36
commit 658ffea8ee
6 changed files with 19 additions and 16 deletions

View file

@ -22,7 +22,7 @@
# Version: $Id$ # Version: $Id$
from sys import argv from sys import argv
from gnuviechadmin.config import config from gnuviechadmin.config import CONFIG
from gnuviechadmin.cli import CommandLineInterface from gnuviechadmin.cli import CommandLineInterface
CommandLineInterface(config, argv).run() CommandLineInterface(CONFIG, argv).run()

View file

@ -1,10 +1,10 @@
from sqlalchemy import * from sqlalchemy import *
from migrate import * from migrate import *
from gnuviechadmin.config import config from gnuviechadmin.config import CONFIG
dbschema = None dbschema = None
if 'database.schema' in config: if 'database.schema' in CONFIG:
dbschema = config['database.schema'] dbschema = CONFIG['database.schema']
meta = MetaData(migrate_engine) meta = MetaData(migrate_engine)
client = Table( client = Table(

View file

@ -1,10 +1,10 @@
from sqlalchemy import * from sqlalchemy import *
from migrate import * from migrate import *
from gnuviechadmin.config import config from gnuviechadmin.config import CONFIG
dbschema = None dbschema = None
if 'database.schema' in config: if 'database.schema' in CONFIG:
dbschema = config['database.schema'] dbschema = CONFIG['database.schema']
meta = MetaData(migrate_engine) meta = MetaData(migrate_engine)
domain = Table('domain', meta, schema = dbschema, autoload = True) domain = Table('domain', meta, schema = dbschema, autoload = True)

View file

@ -1,11 +1,11 @@
from sqlalchemy import MetaData, Table, Column, Integer, Unicode, ForeignKey from sqlalchemy import MetaData, Table, Column, Integer, Unicode, ForeignKey
from migrate import migrate_engine from migrate import migrate_engine
from migrate.changeset.schema import create_column from migrate.changeset.schema import create_column
from gnuviechadmin.config import config from gnuviechadmin.config import CONFIG
dbschema = None dbschema = None
if 'database.schema' in config: if 'database.schema' in CONFIG:
dbschema = config['database.schema'] dbschema = CONFIG['database.schema']
meta = MetaData(migrate_engine) meta = MetaData(migrate_engine)
client = Table('client', meta, schema = dbschema, autoload = True) client = Table('client', meta, schema = dbschema, autoload = True)

View file

@ -21,7 +21,7 @@
"""This module defines the BackendEntityHandler class.""" """This module defines the BackendEntityHandler class."""
import logging import logging
from sqlalchemy.orm import create_session, mapper, relation from sqlalchemy.orm import create_session
from gnuviechadmin.backend.tables import dbsetup from gnuviechadmin.backend.tables import dbsetup

View file

@ -20,6 +20,9 @@
# USA. # USA.
# #
# Version: $Id$ # Version: $Id$
"""
Parse the configuration and setup logging.
"""
from sys import argv from sys import argv
from os import getcwd from os import getcwd
@ -28,10 +31,10 @@ from paste.deploy import appconfig
from logging.config import fileConfig from logging.config import fileConfig
if len(argv) > 1 and isfile(argv[1]): if len(argv) > 1 and isfile(argv[1]):
configfile = argv[1] CONFIGFILE = argv[1]
del argv[1] del argv[1]
else: else:
configfile = 'development.ini' CONFIGFILE = 'development.ini'
config = appconfig('config:%s' % configfile, relative_to=getcwd()) CONFIG = appconfig('config:%s' % CONFIGFILE, relative_to=getcwd())
fileConfig(configfile, config) fileConfig(CONFIGFILE, CONFIG)