@@ -299,11 +299,14 @@ def temp_database(*args, **kwargs) -> Connection:
299
299
class TPB : # pylint: disable=R0902
300
300
"""Transaction Parameter Buffer.
301
301
"""
302
- def __init__ (self , * , access_mode : TraAccessMode = TraAccessMode .WRITE ,
303
- isolation : Isolation = Isolation .SNAPSHOT ,
304
- lock_timeout : int = - 1 , no_auto_undo : bool = False ,
305
- auto_commit : bool = False , ignore_limbo : bool = False ,
306
- at_snapshot_number : int = None , encoding : str = 'ascii' ):
302
+ def __init__ (self , * , access_mode : TraAccessMode = TraAccessMode .WRITE ,
303
+ isolation : Isolation = Isolation .SNAPSHOT ,
304
+ lock_timeout : int = - 1 ,
305
+ no_auto_undo : bool = False ,
306
+ auto_commit : bool = False ,
307
+ ignore_limbo : bool = False ,
308
+ at_snapshot_number : int = None ,
309
+ encoding : str = 'ascii' ):
307
310
self .encoding : str = encoding
308
311
self .access_mode : TraAccessMode = access_mode
309
312
self .isolation : Isolation = isolation
@@ -2441,7 +2444,8 @@ def begin(self, tpb: bytes=None) -> None: # pylint: disable=W0621
2441
2444
"""
2442
2445
assert not self .__closed
2443
2446
self ._finish () # Make sure that previous transaction (if any) is ended
2444
- self ._tra = self ._connection ()._att .start_transaction (tpb or self .default_tpb )
2447
+ self ._tra = self ._connection ()._att .start_transaction (self .default_tpb if tpb is None
2448
+ else tpb )
2445
2449
def commit (self , * , retaining : bool = False ) -> None :
2446
2450
"""Commits the transaction managed by this instance.
2447
2451
0 commit comments