Browse Source

some pylint fixes (addresses #24)

master
Jan Dittberner 12 years ago
parent
commit
658ffea8ee
  1. 4
      bin/gva
  2. 6
      data/dbrepo/versions/002.py
  3. 6
      data/dbrepo/versions/003.py
  4. 6
      data/dbrepo/versions/004_Add_organization_table.py
  5. 2
      gnuviechadmin/backend/BackendEntityHandler.py
  6. 11
      gnuviechadmin/config.py

4
bin/gva

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

6
data/dbrepo/versions/002.py

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

6
data/dbrepo/versions/003.py

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

6
data/dbrepo/versions/004_Add_organization_table.py

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

2
gnuviechadmin/backend/BackendEntityHandler.py

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

11
gnuviechadmin/config.py

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

Loading…
Cancel
Save