Changeset 195
- Timestamp:
- 10/12/07 19:15:12
- Files:
-
- trunk/geniusql/objects.py (modified) (1 diff)
- trunk/geniusql/providers/pypgsql.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/geniusql/objects.py
r194 r195 899 899 self.connections.lock("Transaction denied due to DDL: %r" % sql) 900 900 try: 901 ## # Must shut down all connections to avoid902 ## # "being accessed by other users" error?903 ## self.connections.shutdown()904 901 if conn is None: 905 902 # Important: use _factory(), not get(), to avoid the lock trunk/geniusql/providers/pypgsql.py
r194 r195 28 28 return libpq.PQconnectdb(connstr) 29 29 except libpq.DatabaseError, x: 30 if (x.args[0].startswith('could not connect') or 31 x.args[0].startswith('timeout expired')): 32 raise errors.OutOfConnectionsError() 30 msg = x.args[0] 31 if (msg.startswith('could not connect') or 32 msg.startswith('server closed the connection unexpectedly') or 33 msg.startswith('timeout expired') 34 ): 35 raise errors.OutOfConnectionsError(*x.args) 33 36 raise 34 37
