diff --git a/bin/netsvc.py b/bin/netsvc.py index 73cbdfceeff..fca2ece17c0 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -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 diff --git a/bin/sql_db.py b/bin/sql_db.py index 3c348bcf010..2c67b3187b7 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -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)