mirror of
https://github.com/django/django.git
synced 2024-11-18 07:26:04 +00:00
Removed unused branch in __getattr__() of Oracle and MySQL cursor wrappers.
This commit is contained in:
parent
18db55bb31
commit
fc2dee6908
@ -84,10 +84,7 @@ class CursorWrapper:
|
|||||||
raise
|
raise
|
||||||
|
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
if attr in self.__dict__:
|
return getattr(self.cursor, attr)
|
||||||
return self.__dict__[attr]
|
|
||||||
else:
|
|
||||||
return getattr(self.cursor, attr)
|
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return iter(self.cursor)
|
return iter(self.cursor)
|
||||||
|
@ -518,10 +518,7 @@ class FormatStylePlaceholderCursor:
|
|||||||
return VariableWrapper(self.cursor.arrayvar(*args))
|
return VariableWrapper(self.cursor.arrayvar(*args))
|
||||||
|
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
if attr in self.__dict__:
|
return getattr(self.cursor, attr)
|
||||||
return self.__dict__[attr]
|
|
||||||
else:
|
|
||||||
return getattr(self.cursor, attr)
|
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return (_rowfactory(r, self.cursor) for r in self.cursor)
|
return (_rowfactory(r, self.cursor) for r in self.cursor)
|
||||||
|
Loading…
Reference in New Issue
Block a user