=== modified file 'bin/netsvc.py' --- bin/netsvc.py 2010-09-03 07:42:25 +0000 +++ bin/netsvc.py 2010-09-03 15:32:23 +0000 @@ -93,7 +93,7 @@ class DBLogger(logging.getLoggerClass()): def makeRecord(self, *args, **kwargs): record = logging.Logger.makeRecord(self, *args, **kwargs) - record.dbname = getattr(threading.current_thread(), 'dbname', '?') + record.dbname = getattr(threading.currentThread(), 'dbname', '?') return record def init_logger(): === modified file 'bin/sql_db.py' --- bin/sql_db.py 2010-09-03 08:59:07 +0000 +++ bin/sql_db.py 2010-09-03 15:31:53 +0000 @@ -22,7 +22,7 @@ __all__ = ['db_connect', 'close_db'] -from threading import current_thread +from threading import currentThread import netsvc from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT, ISOLATION_LEVEL_READ_COMMITTED, ISOLATION_LEVEL_SERIALIZABLE from psycopg2.psycopg1 import cursor as psycopg1cursor @@ -349,13 +349,13 @@ _Pool = ConnectionPool(int(tools.config['db_maxconn'])) def db_connect(db_name): - current_thread().dbname = db_name + currentThread().dbname = db_name return Connection(_Pool, db_name) def close_db(db_name): _Pool.close_all(dsn(db_name)) tools.cache.clean_caches_for_db(db_name) - ct = current_thread() + ct = currentThread() if hasattr(ct, 'dbname'): delattr(ct, 'dbname')