mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-25 18:33:44 +03:00
Fixed rollback on error on Zope (ticket #73)
This commit is contained in:
parent
b5de04d2ff
commit
71a4c2bac9
1
NEWS
1
NEWS
|
@ -2,6 +2,7 @@ What's new in psycopg 2.4.4
|
|||
---------------------------
|
||||
|
||||
- Named DictCursor/RealDictCursor honour itersize (ticket #80).
|
||||
- Fixed rollback on error on Zope (ticket #73).
|
||||
|
||||
|
||||
What's new in psycopg 2.4.3
|
||||
|
|
|
@ -47,12 +47,15 @@ class DB(TM, dbi_db.DB):
|
|||
self.calls = 0
|
||||
self.make_mappings()
|
||||
|
||||
def getconn(self, create=True):
|
||||
def getconn(self, init=True):
|
||||
# if init is False we are trying to get hold on an already existing
|
||||
# connection, so we avoid to (re)initialize it risking errors.
|
||||
conn = pool.getconn(self.dsn)
|
||||
conn.set_isolation_level(int(self.tilevel))
|
||||
conn.set_client_encoding(self.encoding)
|
||||
for tc in self.typecasts:
|
||||
register_type(tc, conn)
|
||||
if init:
|
||||
conn.set_isolation_level(int(self.tilevel))
|
||||
conn.set_client_encoding(self.encoding)
|
||||
for tc in self.typecasts:
|
||||
register_type(tc, conn)
|
||||
return conn
|
||||
|
||||
def putconn(self, close=False):
|
||||
|
|
Loading…
Reference in New Issue
Block a user