[FIX] fix python2.4 compatibility

bzr revid: christophe@cobalt-20081218090701-n7acd0nmsilygkjy
This commit is contained in:
Christophe Simonis 2008-12-18 10:07:01 +01:00
parent 8381cdebc2
commit b53c23bce0
2 changed files with 2 additions and 2 deletions

View File

@ -403,7 +403,7 @@ class TinySocketClientThread(threading.Thread):
import pdb
tb = sys.exc_info()[2]
pdb.post_mortem(tb)
e = Exception(e.message)
e = Exception(str(e))
ts.mysend(e, exception=True, traceback=tb_s)
except:
pass

View File

@ -215,7 +215,7 @@ class PoolManager(object):
logger.notifyChannel('dbpool', netsvc.LOG_INFO, 'Connecting to %s' % (db_name,))
PoolManager._pools[db_name] = ConnectionPool(ThreadedConnectionPool(1, PoolManager.maxconn, PoolManager.dsn(db_name)), db_name)
except Exception, e:
logger.notifyChannel('dbpool', netsvc.LOG_ERROR, 'Unable to connect to %s: %s' % (db_name, e.message))
logger.notifyChannel('dbpool', netsvc.LOG_ERROR, 'Unable to connect to %s: %s' % (db_name, str(e))
raise
return PoolManager._pools[db_name]
get = staticmethod(get)