Mercurial > p > roundup > code
diff roundup/backends/back_postgresql.py @ 3155:57b60bda9473
Python 2.3 minimum version - bye bye roundup.rlog, you had a short life.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 14 Feb 2005 02:48:12 +0000 |
| parents | 519b92df37dc |
| children | 3518d1ffd940 |
line wrap: on
line diff
--- a/roundup/backends/back_postgresql.py Mon Feb 14 00:11:36 2005 +0000 +++ b/roundup/backends/back_postgresql.py Mon Feb 14 02:48:12 2005 +0000 @@ -1,4 +1,4 @@ -#$Id: back_postgresql.py,v 1.28 2005-01-13 05:02:18 richard Exp $ +#$Id: back_postgresql.py,v 1.29 2005-02-14 02:48:11 richard Exp $ # # Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <andrey@micro.lt> # @@ -11,6 +11,7 @@ import os, shutil, popen2, time import psycopg +import logging from roundup import hyperdb, date from roundup.backends import rdbms_common @@ -27,13 +28,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): @@ -96,8 +97,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:
