(config.SFA_DB_USER,config.SFA_DB_PASSWORD,config.SFA_DB_HOST,config.SFA_DB_PORT,dbname)
for url in [ unix_url, tcp_url ] :
try:
+ logger.debug("Trying db URL %s"%url)
self.engine = create_engine (url)
self.check()
self.url=url
except:
pass
self.engine=None
- raise Exception,"Could not connect to database"
-
+ raise Exception,"Could not connect to database %s as %s with psycopg2"%(dbname,config.SFA_DB_USER)
+
# expects boolean True: debug is ON or False: debug is OFF
def debug (self, echo):