Browse Source

some pylint fixes (addresses #24)

master
Jan Dittberner 11 years ago
parent
commit
658ffea8ee
6 changed files with 19 additions and 16 deletions
  1. +2
    -2
      bin/gva
  2. +3
    -3
      data/dbrepo/versions/002.py
  3. +3
    -3
      data/dbrepo/versions/003.py
  4. +3
    -3
      data/dbrepo/versions/004_Add_organization_table.py
  5. +1
    -1
      gnuviechadmin/backend/BackendEntityHandler.py
  6. +7
    -4
      gnuviechadmin/config.py

+ 2
- 2
bin/gva View File

@@ -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()

+ 3
- 3
data/dbrepo/versions/002.py View File

@@ -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(


+ 3
- 3
data/dbrepo/versions/003.py View File

@@ -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)


+ 3
- 3
data/dbrepo/versions/004_Add_organization_table.py View File

@@ -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)


+ 1
- 1
gnuviechadmin/backend/BackendEntityHandler.py View File

@@ -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




+ 7
- 4
gnuviechadmin/config.py View File

@@ -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