diff --git a/development.ini b/development.ini --- a/development.ini +++ b/development.ini @@ -503,7 +503,6 @@ sqlalchemy.url = sqlite:///%(here)s/kall # see sqlalchemy docs for others -sqlalchemy.echo = false sqlalchemy.pool_recycle = 3600 ################################ diff --git a/kallithea/lib/db_manage.py b/kallithea/lib/db_manage.py --- a/kallithea/lib/db_manage.py +++ b/kallithea/lib/db_manage.py @@ -63,12 +63,11 @@ def notify(msg): class DbManage(object): - def __init__(self, log_sql, dbconf, root, tests=False, SESSION=None, cli_args=None): + def __init__(self, dbconf, root, tests=False, SESSION=None, cli_args=None): self.dbname = dbconf.split('/')[-1] self.tests = tests self.root = root self.dburi = dbconf - self.log_sql = log_sql self.db_exists = False self.cli_args = cli_args or {} self.init_db(SESSION=SESSION) @@ -86,7 +85,7 @@ class DbManage(object): self.sa = SESSION else: #init new sessions - engine = create_engine(self.dburi, echo=self.log_sql) + engine = create_engine(self.dburi) init_model(engine) self.sa = Session() diff --git a/kallithea/lib/paster_commands/setup_db.py b/kallithea/lib/paster_commands/setup_db.py --- a/kallithea/lib/paster_commands/setup_db.py +++ b/kallithea/lib/paster_commands/setup_db.py @@ -95,7 +95,7 @@ class Command(BasePasterCommand): conf = paste.deploy.appconfig('config:' + path_to_ini_file) dbconf = conf['sqlalchemy.url'] - dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=conf['here'], + dbmanage = DbManage(dbconf=dbconf, root=conf['here'], tests=False, cli_args=vars(opts)) dbmanage.create_tables(override=True) opts = dbmanage.config_prompt(None) diff --git a/kallithea/lib/paster_commands/template.ini.mako b/kallithea/lib/paster_commands/template.ini.mako --- a/kallithea/lib/paster_commands/template.ini.mako +++ b/kallithea/lib/paster_commands/template.ini.mako @@ -507,7 +507,6 @@ sqlalchemy.url = mysql://user:pass@local %endif # see sqlalchemy docs for others -sqlalchemy.echo = false sqlalchemy.pool_recycle = 3600 <%text>################################ diff --git a/kallithea/tests/fixture.py b/kallithea/tests/fixture.py --- a/kallithea/tests/fixture.py +++ b/kallithea/tests/fixture.py @@ -329,7 +329,7 @@ def create_test_env(repos_test_path, con log.debug('Creating testdir %s', repos_test_path) os.makedirs(repos_test_path) - dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=config['here'], + dbmanage = DbManage(dbconf=dbconf, root=config['here'], tests=True) dbmanage.create_tables(override=True) # for tests dynamically set new root paths based on generated content diff --git a/kallithea/tests/test.ini b/kallithea/tests/test.ini --- a/kallithea/tests/test.ini +++ b/kallithea/tests/test.ini @@ -506,7 +506,6 @@ sqlalchemy.url = sqlite:///%(here)s/kall # see sqlalchemy docs for others -sqlalchemy.echo = false sqlalchemy.pool_recycle = 3600 ################################