[1.5.x] Fixed #18989 -- Removed unused condition in CursorWrapper

Thanks zimnyx for the report.
Backport of 8c6927876 from master.
This commit is contained in:
Claude Paroz 2012-11-17 10:51:30 +01:00
parent 11539aad1e
commit a023952e10
1 changed files with 3 additions and 5 deletions

View File

@ -24,11 +24,9 @@ class CursorWrapper(object):
self.db.set_dirty()
def __getattr__(self, attr):
self.set_dirty()
if attr in self.__dict__:
return self.__dict__[attr]
else:
return getattr(self.cursor, attr)
if attr in ('execute', 'executemany', 'callproc'):
self.set_dirty()
return getattr(self.cursor, attr)
def __iter__(self):
return iter(self.cursor)