- Timestamp:
- 05/30/07 21:02:51 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/pgstorage.py
r3133 r3182 52 52 53 53 self.tool.logdebug("Trying to open database (host=%s, port=%s, dbname=%s, user=%s)..." % (host, port, dbname, user)) 54 self.database = pg.connect(host=host, port=port, dbname=dbname, user=user, passwd=passwd) 54 try : 55 self.database = pg.connect(host=host, port=port, dbname=dbname, user=user, passwd=passwd) 56 except PGError, msg : 57 msg = "%(msg)s --- the most probable cause of your problem is that PostgreSQL is down, or doesn't accept incoming connections because you didn't configure it as explained in PyKota's documentation." % locals() 58 raise PGError, msg 55 59 self.closed = 0 56 60 try : … … 78 82 after = time.time() 79 83 self.tool.logdebug("Transaction committed.") 80 self.tool.logdebug("Transaction duration : %.4f seconds" % (after - self.before))84 #self.tool.logdebug("Transaction duration : %.4f seconds" % (after - self.before)) 81 85 82 86 def rollbackTransaction(self) : … … 85 89 after = time.time() 86 90 self.tool.logdebug("Transaction aborted.") 87 self.tool.logdebug("Transaction duration : %.4f seconds" % (after - self.before))91 #self.tool.logdebug("Transaction duration : %.4f seconds" % (after - self.before)) 88 92 89 93 def doRawSearch(self, query) : … … 100 104 else : 101 105 after = time.time() 102 self.tool.logdebug("Query Duration : %.4f seconds" % (after - before))106 #self.tool.logdebug("Query Duration : %.4f seconds" % (after - before)) 103 107 return result 104 108 … … 123 127 else : 124 128 after = time.time() 125 self.tool.logdebug("Query Duration : %.4f seconds" % (after - before))129 #self.tool.logdebug("Query Duration : %.4f seconds" % (after - before)) 126 130 return result 127 131