Mercurial > p > roundup > code
diff roundup/backends/back_postgresql.py @ 3156:e1da7b5b04ab maint-0.8
merge from HEAD
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 14 Feb 2005 02:55:31 +0000 |
| parents | 406862712b7d |
| children | 088c1792b7f6 |
line wrap: on
line diff
--- a/roundup/backends/back_postgresql.py Mon Feb 14 01:26:14 2005 +0000 +++ b/roundup/backends/back_postgresql.py Mon Feb 14 02:55:31 2005 +0000 @@ -10,6 +10,7 @@ import os, shutil, popen2, time import psycopg +import logging from roundup import hyperdb, date from roundup.backends import rdbms_common @@ -26,13 +27,13 @@ def db_create(config): """Clear all database contents and drop database itself""" command = 'CREATE DATABASE %s'%config.RDBMS_NAME - config.logging.getLogger('hyperdb').info(command) + logging.getLogger('hyperdb').info(command) db_command(config, command) def db_nuke(config, fail_ok=0): """Clear all database contents and drop database itself""" command = 'DROP DATABASE %s'% config.RDBMS_NAME - config.logging.getLogger('hyperdb').info(command) + logging.getLogger('hyperdb').info(command) db_command(config, command) if os.path.exists(config.DATABASE): @@ -95,8 +96,7 @@ def sql_open_connection(self): db = connection_dict(self.config, 'database') - self.config.logging.getLogger('hyperdb').info('open database %r'%( - db['database'],)) + logging.getLogger('hyperdb').info('open database %r'%db['database']) try: conn = psycopg.connect(**db) except psycopg.OperationalError, message:
