[python-win32] adodbapi transaction counter

Jure Erznožnik Jure.Erznoznik at perftech.si
Wed Nov 12 15:32:18 CET 2014


I just installed this on Python 2.7 and immediately ran into a possible bug:

When connection.rollback() is called, a new transaction wasn't immediately started.
I traced the bug to line 382 in adodbapi.py where transaction_level is checked against 0. However, the COM routine called a bit above this line actually returns None as current level.

Adding the check for None solves the issue:

adodbapi.py
def _rollback(self):
    # original statement didn't check for None
    if self.transaction_level == 0 or self.transaction_level is None:  # line 382


Is it possible to add this to project source / PyPI?

LP,
Jure
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20141112/d2716bcc/attachment.html>


More information about the python-win32 mailing list